You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When working with GeoDataFrames, the coordinate reference system (CRS) is stored as a pyproj.CRS object: geopandas.GeoDataFrame.crs. So in swmmio, I expected to get the same behavior when calling model.crs and model.links.geodataframe.crs. However, I realized that the first returns a str and the second returns pyproj.CRS.
Example:
fromswmmio.examplesimportphillyimportcopymodel=copy.deepcopy(philly)
print(f'Data type of model.crs: {type(model.crs)}')
print(f'Data type of model.links.geodataframe.crs: {type(model.links.geodataframe.crs)}')
Output:
Data type of model.crs: <class 'str'>
Data type of model.links.geodataframe.crs: <class 'pyproj.crs.crs.CRS'>
I could see a benefit to aligning model.crs with the GeoPandas convention. Thoughts?
The text was updated successfully, but these errors were encountered:
I think I agree with that - we ought to follow the convention in GeoPandas. On a related note, I'd also like us to add type hints on all the public functions/methods, per #240.
When working with GeoDataFrames, the coordinate reference system (CRS) is stored as a
pyproj.CRS
object: geopandas.GeoDataFrame.crs. So in swmmio, I expected to get the same behavior when callingmodel.crs
andmodel.links.geodataframe.crs
. However, I realized that the first returns astr
and the second returnspyproj.CRS
.Example:
Output:
I could see a benefit to aligning
model.crs
with the GeoPandas convention. Thoughts?The text was updated successfully, but these errors were encountered: