Uploaded image for project: 'GeoTools'
  1. GEOT-5582

geopackage creates inconsistent CRS's (y-axis)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 16.1, 17-beta
    • Component/s: geopkg
    • Labels:
      None

      Description

      This causes the coverage renderer to to fail if org.geotools.referencing.forceXY is set to false.

      In several places, geopackage generates a CRS from a SRID. In some places it explicitly specifies "longitude first" (as it should), but in some places it does not (which means you may get a latitude first if longitude first isn't forced by a sysprop or hint)

      If you look at this and the following lines: https://github.com/geotools/geotools/blob/master/modules/library/render/src/main/java/org/geotools/renderer/lite/gridcoverage2d/GridCoverageReaderHelper.java#L466

      You can see there is the assumption there that reader.getCoordinateReferenceSystem() returns the same CRS as the CRS of coverageEnvelope. But this is not the same for geopackage, if org.geotools.referencing.forceXY is set to false (the latter having incorrectly lattitude first). This causes an exception when attempting to intersect the two envelopes.

        Attachments

          Activity

            People

            • Assignee:
              NielsCharlier Niels Charlier
              Reporter:
              NielsCharlier Niels Charlier
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: