Skip to content

Commit

Permalink
try to use crs correctly if available
Browse files Browse the repository at this point in the history
  • Loading branch information
ljwolf committed Mar 15, 2019
1 parent 151b85b commit d142291
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cenpy/tiger.py
Expand Up @@ -182,7 +182,11 @@ def query(self, **kwargs):
outdf = GeoDataFrame(outdf)
except:
print('Geopandas dataframe conversion failed! Continuing...')
outdf.crs = datadict.pop('spatialReference', {})
crs = datadict.pop('spatialReference', None)
if crs is not None:
crs = crs.get('latestWkid', crs.get('wkid'))
crs = dict('init':'epsg:{}'.format(crs))
outdf.crs = crs
return outdf

class TigerConnection(object):
Expand Down

0 comments on commit d142291

Please sign in to comment.