I have a geopandas dataframe that has POINT geometry in NAD83
. I want to use to_crs
to change them to espg: 4326
. When I first bring in the feature class as a gpd dataframe, it shows no crs, so I use a function to find the source crs and then assign it to the dataframe (my understanding is that to use to_crs
it has to already be assigned to a crs).
bldg_feat_cent_df = gpd.read_file(bldg_cent_cb_intersects_gdb, layer=state_bldg_centroid)
print(bldg_feat_cent_df.crs)
>>>None
bldg_feat_cent_df.crs = {'init' :'+proj=aea +lat_1=20 +lat_2=60 +lat_0=40 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs'}
print(bldg_feat_cent_df.crs)
>>>'+proj=aea +lat_1=20 +lat_2=60 +lat_0=40 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs '
Now that its in a crs, I simply want to apply to_crs
. I've tried this a couple of different ways, including inplace=True
but I still get the same error:
bldg_reproj = bldg_feat_cent_df.to_crs({'init': 'epsg:4326'})
> RuntimeError: b'no arguments in initialization list'
I had a similar issue trying to use pyproj and it seems like the 2 are related. Conda shows that my pyproj
version is 1.96. How can achieve my goal and resolve this issue?
Update: As requested, here's the output when I run the above line:
geopandas.show_versions()
(in case you have geopandas 0.6.0) ? Can you give some more details about your OS, how you installed those packages (new environment, from conda-forge?) Maybe show the output ofconda info
– joris Oct 11 '19 at 16:13import pyproj; pyproj.set_datapath("~AppData/Local/conda/conda/envs/geo_env/share/proj")
helps? (best check that the path is correct and exists, I might have made a typo) – joris Oct 11 '19 at 18:48