I have a shapefile of historical county boundaries with a valid .prj file. I can open it in ArcGIS and find that the projection is USA Contiguous Albers Equal Area Conic. I can also plot the shapefile after I have read it into geopandas and the projection looks correct.
However, I can't print the name of the coordinate system in my Python IDE.
If you read in the built in data from geopandas
world = gpd.read_file(gpd.datasets.get_path('naturalearth_lowres'))
and then run
print(world.crs)
you get
{'init': 'epsg:4326'}
But if I run
counties1910 = gpd.read_file('counties1910.shp')
print(counties1910.crs)
all I get is
{}
Additionally, I have found that while I can manually run
counties1910.crs = {'init' :'epsg:102003'}
without an error, I do get an error if I try to reproject counties1910:
counties1910 = counties1910.to_crs("EPSG:4326")
--------------------------------------------------------------------------
CRSError Traceback (most recent call last)
<ipython-input-148-4aa2873c2f22> in <module>
----> 1 counties1910 = counties1910.to_crs("EPSG:4326")
~\AppData\Local\Continuum\anaconda3\lib\site-packages\geopandas\geodataframe.py in to_crs(self, crs, epsg, inplace)
532 else:
533 df = self.copy()
--> 534 geom = df.geometry.to_crs(crs=crs, epsg=epsg)
535 df.geometry = geom
536 df.crs = geom.crs
~\AppData\Local\Continuum\anaconda3\lib\site-packages\geopandas\geoseries.py in to_crs(self, crs, epsg)
408 # skip transformation if the input CRS and output CRS are the exact same
409 if _PYPROJ_VERSION >= LooseVersion("2.1.2") and pyproj.CRS.from_user_input(
--> 410 self.crs
411 ).is_exact_same(pyproj.CRS.from_user_input(crs)):
412 return self
~\AppData\Local\Continuum\anaconda3\lib\site-packages\pyproj\crs\crs.py in from_user_input(value, **kwargs)
438 if isinstance(value, CRS):
439 return value
--> 440 return CRS(value, **kwargs)
441
442 def get_geod(self) -> Optional[Geod]:
~\AppData\Local\Continuum\anaconda3\lib\site-packages\pyproj\crs\crs.py in __init__(self, projparams, **kwargs)
294 projstring = _prepare_from_string(" ".join((projstring, projkwargs)))
295
--> 296 super().__init__(projstring)
297
298 @staticmethod
pyproj/_crs.pyx in pyproj._crs._CRS.__init__()
CRSError: Invalid projection: +init=epsg:102003 +type=crs: (Internal Proj Error: proj_create: crs not found)
What am I missing?
Thanks!