Skip to content

UserWarning: Geometry is in a geographic CRS #999

Open
@emanuel-schmid

Description

There are several places where some geometry based calculation is done in a GeoDataFrame with a geographic CRS:

warning module lineno
Geometry is in a geographic CRS. Results from 'distance' are likely incorrect. Use 'GeoSeries.to_crs()' to re-project geometries to a projected CRS before this operation. climada.hazard.centroids.centr 647
Geometry is in a geographic CRS. Results from 'buffer' are likely incorrect. Use 'GeoSeries.to_crs()' to re-project geometries to a projected CRS before this operation. climada.hazard.test.test_tc_tracks 646
Geometry is in a geographic CRS. Results from 'buffer' are likely incorrect. Use 'GeoSeries.to_crs()' to re-project geometries to a projected CRS before this operation. climada.hazard.tc_tracks 347
Geometry is in a geographic CRS. Results from 'buffer' are likely incorrect. Use 'GeoSeries.to_crs()' to re-project geometries to a projected CRS before this operation. climada.hazard.tc_tracks 350
Geometry is in a geographic CRS. Results from 'area' are likely incorrect. Use 'GeoSeries.to_crs()' to re-project geometries to a projected CRS before this operation. climada.util.test.test_coordinates 1456
Geometry is in a geographic CRS. Results from 'length' are likely incorrect. Use 'GeoSeries.to_crs()' to re-project geometries to a projected CRS before this operation. climada.util.lines_polys_handler 957

These warnings may be raised unnecessarily, e.g. in plotting methods where the result does not matter much - or they should be taken seriously.
Each occurrence should be evaluated and depending on which case they belong to, the warning should be silenced or measures should be taken.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions