GeoTiffReader threw GEOTIFF Module Error Report

Description

I downloaded Canada's official Digital Elevation Model (DEM) data – aka "CDEM" – from

https://open.canada.ca/data/en/dataset/7f245e4d-76c2-4caa-951a-45d1d2051333

This data is packaged as GeoTIFF files. I attempted to use GeoTiffReader to read one of its GeoTIFF files.

The attachments to this bug report include a small sample GeoTIFF file and its associated XML file, which you can use for testing. (Can the XML file be fed to GeoTiffReader to aid in the parsing of these GeoTIFF files? I wish the JavaDoc was a bit more descriptive on this topic.)

The attempt to read the GeoTIFF file failed because GeoTiffReader doesn't support the coordinate system EPSG:4617 which is documented here

https://epsg.io/4617

Here is the stack trace with all the details:

{code}

Exception in thread "main" org.geotools.data.DataSourceException: GEOTIFF Module Error Report
No code "EPSG:4617" from authority "EPSG" found for object of type "EngineeringCRS".
ModelPixelScaleTag: [2.0833333333333308E-4,2.0833333333333308E-4,0.0]
ModelTiePointTag: (1 tie points)
TP #0: [0.0,0.0,0.0] -> [-64.00010416666667,45.00010416666666,0.0]
ModelTransformationTag: NOT AVAILABLE
GeoKey #1: Key = 1024, Value = 2
GeoKey #2: Key = 2048, Value = 4617
GeoKey #3: Key = 1025, Value = 1
GeoKey #4: Key = 2049, Value = NAD83(CSRS)
GeoKey #5: Key = 2054, Value = 9102
GeoKey #6: Key = 2057, Value = 6378137.0
GeoKey #7: Key = 2059, Value = 298.2572221010002
GeoKey #8: Key = 2062, Value = 0.0
org.opengis.referencing.NoSuchAuthorityCodeException: No code "EPSG:4617" from authority "EPSG" found for object of type "EngineeringCRS".
at org.geotools.referencing.factory.epsg.CartesianAuthorityFactory.noSuchAuthorityException(CartesianAuthorityFactory.java:136)
at org.geotools.referencing.factory.epsg.CartesianAuthorityFactory.createEngineeringCRS(CartesianAuthorityFactory.java:130)
at org.geotools.referencing.factory.epsg.CartesianAuthorityFactory.createCoordinateReferenceSystem(CartesianAuthorityFactory.java:121)
at org.geotools.referencing.factory.AuthorityFactoryAdapter.createCoordinateReferenceSystem(AuthorityFactoryAdapter.java:802)
at org.geotools.coverage.grid.io.imageio.geotiff.GeoTiffMetadata2CRSAdapter.createGeographicCoordinateReferenceSystem(GeoTiffMetadata2CRSAdapter.java:393)
at org.geotools.coverage.grid.io.imageio.geotiff.GeoTiffMetadata2CRSAdapter.createCoordinateSystem(GeoTiffMetadata2CRSAdapter.java:209)
at org.geotools.gce.geotiff.GeoTiffReader.getHRInfo(GeoTiffReader.java:330)
at org.geotools.gce.geotiff.GeoTiffReader.<init>(GeoTiffReader.java:254)
at org.geotools.gce.geotiff.GeoTiffReader.<init>(GeoTiffReader.java:184)
at org.geotools.tutorial.quickstart.CdemReader.main(CdemReader.java:29)

at org.geotools.gce.geotiff.GeoTiffReader.<init>(GeoTiffReader.java:267)
at org.geotools.gce.geotiff.GeoTiffReader.<init>(GeoTiffReader.java:184)
at org.geotools.tutorial.quickstart.CdemReader.main(CdemReader.java:29)
Caused by: org.geotools.data.DataSourceException: GEOTIFF Module Error Report
No code "EPSG:4617" from authority "EPSG" found for object of type "EngineeringCRS".
ModelPixelScaleTag: [2.0833333333333308E-4,2.0833333333333308E-4,0.0]
ModelTiePointTag: (1 tie points)
TP #0: [0.0,0.0,0.0] -> [-64.00010416666667,45.00010416666666,0.0]
ModelTransformationTag: NOT AVAILABLE
GeoKey #1: Key = 1024, Value = 2
GeoKey #2: Key = 2048, Value = 4617
GeoKey #3: Key = 1025, Value = 1
GeoKey #4: Key = 2049, Value = NAD83(CSRS)
GeoKey #5: Key = 2054, Value = 9102
GeoKey #6: Key = 2057, Value = 6378137.0
GeoKey #7: Key = 2059, Value = 298.2572221010002
GeoKey #8: Key = 2062, Value = 0.0
org.opengis.referencing.NoSuchAuthorityCodeException: No code "EPSG:4617" from authority "EPSG" found for object of type "EngineeringCRS".
at org.geotools.referencing.factory.epsg.CartesianAuthorityFactory.noSuchAuthorityException(CartesianAuthorityFactory.java:136)
at org.geotools.referencing.factory.epsg.CartesianAuthorityFactory.createEngineeringCRS(CartesianAuthorityFactory.java:130)
at org.geotools.referencing.factory.epsg.CartesianAuthorityFactory.createCoordinateReferenceSystem(CartesianAuthorityFactory.java:121)
at org.geotools.referencing.factory.AuthorityFactoryAdapter.createCoordinateReferenceSystem(AuthorityFactoryAdapter.java:802)
at org.geotools.coverage.grid.io.imageio.geotiff.GeoTiffMetadata2CRSAdapter.createGeographicCoordinateReferenceSystem(GeoTiffMetadata2CRSAdapter.java:393)
at org.geotools.coverage.grid.io.imageio.geotiff.GeoTiffMetadata2CRSAdapter.createCoordinateSystem(GeoTiffMetadata2CRSAdapter.java:209)
at org.geotools.gce.geotiff.GeoTiffReader.getHRInfo(GeoTiffReader.java:330)
at org.geotools.gce.geotiff.GeoTiffReader.<init>(GeoTiffReader.java:254)
at org.geotools.gce.geotiff.GeoTiffReader.<init>(GeoTiffReader.java:184)
at org.geotools.tutorial.quickstart.CdemReader.main(CdemReader.java:29)

at org.geotools.gce.geotiff.GeoTiffReader.getHRInfo(GeoTiffReader.java:492)
at org.geotools.gce.geotiff.GeoTiffReader.<init>(GeoTiffReader.java:254)
... 2 more
Caused by: org.geotools.coverage.grid.io.imageio.geotiff.GeoTiffException: GEOTIFF Module Error Report
No code "EPSG:4617" from authority "EPSG" found for object of type "EngineeringCRS".
ModelPixelScaleTag: [2.0833333333333308E-4,2.0833333333333308E-4,0.0]
ModelTiePointTag: (1 tie points)
TP #0: [0.0,0.0,0.0] -> [-64.00010416666667,45.00010416666666,0.0]
ModelTransformationTag: NOT AVAILABLE
GeoKey #1: Key = 1024, Value = 2
GeoKey #2: Key = 2048, Value = 4617
GeoKey #3: Key = 1025, Value = 1
GeoKey #4: Key = 2049, Value = NAD83(CSRS)
GeoKey #5: Key = 2054, Value = 9102
GeoKey #6: Key = 2057, Value = 6378137.0
GeoKey #7: Key = 2059, Value = 298.2572221010002
GeoKey #8: Key = 2062, Value = 0.0
org.opengis.referencing.NoSuchAuthorityCodeException: No code "EPSG:4617" from authority "EPSG" found for object of type "EngineeringCRS".
at org.geotools.referencing.factory.epsg.CartesianAuthorityFactory.noSuchAuthorityException(CartesianAuthorityFactory.java:136)
at org.geotools.referencing.factory.epsg.CartesianAuthorityFactory.createEngineeringCRS(CartesianAuthorityFactory.java:130)
at org.geotools.referencing.factory.epsg.CartesianAuthorityFactory.createCoordinateReferenceSystem(CartesianAuthorityFactory.java:121)
at org.geotools.referencing.factory.AuthorityFactoryAdapter.createCoordinateReferenceSystem(AuthorityFactoryAdapter.java:802)
at org.geotools.coverage.grid.io.imageio.geotiff.GeoTiffMetadata2CRSAdapter.createGeographicCoordinateReferenceSystem(GeoTiffMetadata2CRSAdapter.java:393)
at org.geotools.coverage.grid.io.imageio.geotiff.GeoTiffMetadata2CRSAdapter.createCoordinateSystem(GeoTiffMetadata2CRSAdapter.java:209)
at org.geotools.gce.geotiff.GeoTiffReader.getHRInfo(GeoTiffReader.java:330)
at org.geotools.gce.geotiff.GeoTiffReader.<init>(GeoTiffReader.java:254)
at org.geotools.gce.geotiff.GeoTiffReader.<init>(GeoTiffReader.java:184)
at org.geotools.tutorial.quickstart.CdemReader.main(CdemReader.java:29)

at org.geotools.coverage.grid.io.imageio.geotiff.GeoTiffMetadata2CRSAdapter.createGeographicCoordinateReferenceSystem(GeoTiffMetadata2CRSAdapter.java:411)
at org.geotools.coverage.grid.io.imageio.geotiff.GeoTiffMetadata2CRSAdapter.createCoordinateSystem(GeoTiffMetadata2CRSAdapter.java:209)
at org.geotools.gce.geotiff.GeoTiffReader.getHRInfo(GeoTiffReader.java:330)
... 3 more
Caused by: org.opengis.referencing.NoSuchAuthorityCodeException: No code "EPSG:4617" from authority "EPSG" found for object of type "EngineeringCRS".
at org.geotools.referencing.factory.epsg.CartesianAuthorityFactory.noSuchAuthorityException(CartesianAuthorityFactory.java:136)
at org.geotools.referencing.factory.epsg.CartesianAuthorityFactory.createEngineeringCRS(CartesianAuthorityFactory.java:130)
at org.geotools.referencing.factory.epsg.CartesianAuthorityFactory.createCoordinateReferenceSystem(CartesianAuthorityFactory.java:121)
at org.geotools.referencing.factory.AuthorityFactoryAdapter.createCoordinateReferenceSystem(AuthorityFactoryAdapter.java:802)
at org.geotools.coverage.grid.io.imageio.geotiff.GeoTiffMetadata2CRSAdapter.createGeographicCoordinateReferenceSystem(GeoTiffMetadata2CRSAdapter.java:393)
... 5 more

{code}

Environment

Development environment: Eclipse 4.7.3a
Platform: macOS 10.13.4

Assignee

Unassigned

Reporter

Loxcel Geomatics

Triage

Components

Affects versions

Priority

Medium
Configure