Skip to content

_transform_coord_system geometry is always assume to be None #6126

Open
@hsteptoe

Description

@hsteptoe

🐛 Bug Report

In _shapefiles._transform_coord_system the geometry_system var is always None which results in masking geometries always being assume to be DEFAULT_CS which is a lon/lat CRS.

trans_geo = _transform_coord_system(geometry, cube_2d)

👇
def _transform_coord_system(geometry, cube, geometry_system=None):

Even if the cube and masking geometry have the same CRS and are in a non-lat/lon CRS (e.g. OSGB) the masking result will wrongly assign the masking geometry a lon/lat CRS. The function doesn't fail, but results in an incorrect masking result.

Expected behaviour

These functions need better handling of non-lat/lon CRSs by retrieving the true CRS (where it exists).

Environment

  • Iris Version: 3.10

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions