-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Visualizing dataframe with non-EPSG:4326 CRS is failing silently #1274
Comments
Yes, this is a good point, because actually we are not using the CRS either for the visualization or the upload to our platform. It assumes that everything is 4326. We are also extracting the SRID in the decoding but it's also not used. So this is a very good feature we need to integrate. Could you provide some guidance or a PoC about how to integrate and use spatial reference systems in the library? Thanks! |
I don't know the online Carto application very well, but I suppose there are good reasons to keep the data on the server always in the same (4326) CRS? For the local usage of Cartoframes, I think there are basically two options:
For both cases, you first need to check if the CRS is equal to CRS:4326. This can be done with using
but because many people are probably using the (soon to be deprecated) "+init" method (where the If you would like to automatically convert the geometries to EPSG:4326 (so the user does not need to do this themselves), you can use the
|
When trying to map a GeoDataFrame with projected coordinates (not lat/long EPSG:4326), such as this example (where
nybb
is in 'epsg:2263'):you get a plot area, but with just a grey background (which is probably somewhere in the sea).
Since GeoDataFrames have a
crs
attribute, I think it would be helpful for users to check this, and either raise an informative error message, or either automatically transform the data when visualizing.The text was updated successfully, but these errors were encountered: