Skip to content
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

CRS equality is returning false for a polygon's CRS #243

andrewdhicks opened this issue Jun 5, 2017 · 0 comments


Copy link

commented Jun 5, 2017

Expected behaviour

The polygon from a shapefile that is in EPSG:3577 is used to query data for data that is stored in the same projection. It should be recognized as the same projection.

Actual behaviour

Each CRS object is converted to its proj4 representation and compared.
The shapefile version is has the same properties as the EPSG derived value, with the addition of the property: +towgs84=0,0,0,0,0,0,0

This additional property causes the equality operator to return false, even though they represent the same CRS.

Relevant code here:

Steps to reproduce the behaviour

from datacube.utils.geometry import CRS

filepath = '/g/data/u46/users/bxb547/GA_tidal_model.shp'
with as shapefile_input:
    crs = CRS(str(shapefile_input.crs_wkt))

epsg3577 = CRS('EPSG:3577')

assert crs == CRS('EPSG:3577')

Environment information


omad added a commit that referenced this issue Aug 28, 2017

Make CRS equality looser
Trust either a _Proj.4_ based comparison  or a _GDAL_ based comparison. 

Closes #243
@omad omad referenced this issue Aug 28, 2017
3 of 3 tasks complete

@omad omad closed this in 71175f1 Aug 29, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.