# Path: geotweet/mapreduce/utils/proj.py
# def project(lonlat):
#     return transform(proj4326, proj102005, *lonlat)
# 
# def rproject(lonlat):
#     return transform(proj102005, proj4326, *lonlat)


import sys
import os
import hashlib
import json
import Geohash
import shapely
from shapely.geometry import shape
from shapely.geometry.point import Point
from rtree import index
from reader import FileReader
from .proj import project, rproject




# reference files to be downloaded from S3 once and stored locally
AWS_BUCKET = "https://s3-us-west-2.amazonaws.com/jeffrey.alan.meyers.bucket"
COUNTIES_GEOJSON = os.path.join(AWS_BUCKET, "geotweet/us_counties102005.geojson")
METRO_GEOJSON = os.path.join(AWS_BUCKET, "geotweet/us_metro_areas102005.geojson")
# use local files instead if these environment variables are set with a filepath
if 'COUNTIES_GEOJSON_LOCAL' in os.environ:
    COUNTIES_GEOJSON = os.environ['COUNTIES_GEOJSON_LOCAL']

# Path: geotweet/mapreduce/utils/proj.py
# def project(lonlat):
#     return transform(proj4326, proj102005, *lonlat)
# 
# def rproject(lonlat):
#     return transform(proj102005, proj4326, *lonlat)


# Path: geotweet/mapreduce/utils/lookup.py
import sys
import os
import hashlib
import json
import Geohash
import shapely
from shapely.geometry import shape
from shapely.geometry.point import Point
from rtree import index
from reader import FileReader
from .proj import project, rproject





# reference files to be downloaded from S3 once and stored locally
AWS_BUCKET = "https://s3-us-west-2.amazonaws.com/jeffrey.alan.meyers.bucket"
COUNTIES_GEOJSON = os.path.join(AWS_BUCKET, "geotweet/us_counties102005.geojson")
METRO_GEOJSON = os.path.join(AWS_BUCKET, "geotweet/us_metro_areas102005.geojson")
# use local files instead if these environment variables are set with a filepath
if 'COUNTIES_GEOJSON_LOCAL' in os.environ:
    COUNTIES_GEOJSON = os.environ['COUNTIES_GEOJSON_LOCAL']

if 'METRO_GEOJSON_LOCAL' in os.environ: