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

JPEG2000 export: do not generate GMLJP2 for projections we don't support #9223

Closed
rouault opened this issue Feb 9, 2024 · 0 comments · Fixed by #9249
Closed

JPEG2000 export: do not generate GMLJP2 for projections we don't support #9223

rouault opened this issue Feb 9, 2024 · 0 comments · Fixed by #9249
Assignees

Comments

@rouault
Copy link
Member

rouault commented Feb 9, 2024

GDAL OGRSpatialReference::exportToXML() is pretty limited and will for example generate incorrect content for

PROJCRS["Africa_Albers_Equal_Area_Conic",
    BASEGEOGCRS["WGS 84",
        DATUM["World Geodetic System 1984",
            ELLIPSOID["WGS 84",6378137,298.257223563,
                LENGTHUNIT["metre",1]]],
        PRIMEM["Greenwich",0,
            ANGLEUNIT["degree",0.0174532925199433]],
        ID["EPSG",4326]],
    CONVERSION["Albers Equal Area",
        METHOD["Albers Equal Area",
            ID["EPSG",9822]],
        PARAMETER["Latitude of false origin",0,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8821]],
        PARAMETER["Longitude of false origin",25,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8822]],
        PARAMETER["Latitude of 1st standard parallel",20,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8823]],
        PARAMETER["Latitude of 2nd standard parallel",-23,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8824]],
        PARAMETER["Easting at false origin",0,
            LENGTHUNIT["metre",1],
            ID["EPSG",8826]],
        PARAMETER["Northing at false origin",0,
            LENGTHUNIT["metre",1],
            ID["EPSG",8827]]],
    CS[Cartesian,2],
        AXIS["easting",east,
            ORDER[1],
            LENGTHUNIT["metre",1,
                ID["EPSG",9001]]],
        AXIS["northing",north,
            ORDER[2],
            LENGTHUNIT["metre",1,
                ID["EPSG",9001]]]]

Not sure we want to invest in improving GML/XML export of SRS, but we should probably just error out / skip GMLJP2 if we can't write it correctly

@rouault rouault self-assigned this Feb 19, 2024
rouault added a commit to rouault/gdal that referenced this issue Feb 19, 2024
rouault added a commit to rouault/gdal that referenced this issue Feb 26, 2024
smithdc1 added a commit to smithdc1/django that referenced this issue Nov 2, 2024
Updated test for change to exportToXML() which now errors out on unsupported projection methods. See OSGeo/gdal#9223.
smithdc1 added a commit to smithdc1/django that referenced this issue Nov 3, 2024
Updated test for change to exportToXML() which now errors out on unsupported projection methods. See OSGeo/gdal#9223.

Co-authored-by: Mariusz Felisiak <[email protected]>
sarahboyce pushed a commit to django/django that referenced this issue Nov 4, 2024
Updated test for change to exportToXML() which now errors out on unsupported projection methods. See OSGeo/gdal#9223.

Co-authored-by: Mariusz Felisiak <[email protected]>
ryancheley pushed a commit to ryancheley/django that referenced this issue Nov 17, 2024
Updated test for change to exportToXML() which now errors out on unsupported projection methods. See OSGeo/gdal#9223.

Co-authored-by: Mariusz Felisiak <[email protected]>
timgraham pushed a commit to timgraham/django that referenced this issue Dec 16, 2024
Updated test for change to exportToXML() which now errors out on unsupported projection methods. See OSGeo/gdal#9223.

Co-authored-by: Mariusz Felisiak <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant