GeoTIFF does not recognize projection and no way to override in user interface

Description

GeoTIFF fails to publish with GeoServer 2.21.x / 2.22.x / 2.23.x:

GeoTiffMetadata2CRSAdapter::createCoordinateSystem:Only Geographic & Projected Systems are supported. at org.geotools.coverage.grid.io.imageio.geotiff.GeoTiffMetadata2CRSAdapter.createCoordinateSystem(GeoTiffMetadata2CRSAdapter.java:190)

Details in the comments.

Environment

None

Activity

Jody Garnett 
June 14, 2023 at 2:35 PM

Marking as Won't Fix, the GeoTools approach to override of adding a `prj` file is fine.

Jody Garnett 
June 14, 2023 at 2:34 PM

I considered if a checkmark or something could be added to the geotiff connect parameters, but really having a ``prj`` file already provides an acceptable workaround in what is hopefully a rare circumstance.

Andrea Aime 
June 14, 2023 at 9:41 AM
(edited)

Hum… and yet that is a legit fix. You’re dealing with a case that was working by accident, and now it’s no more. You’ll need to create a code path that intentionally supports the situation where the CRS cannot be read, and then lock it down with tests (unit and integration) so that it cannot regress.

Jody Garnett 
June 14, 2023 at 9:16 AM
(edited)

Circling back to regression in REST API Interaction, the last known version reported working was GeoServer 2.21.1 / GeoTools 27.1.

Update: Testing GeoServer 2.21.1 myself does not work

Searching GeoTools 27.2 and onward:

project = "GEOT" AND component = coverage AND fixversion >= 27.2 ORDER BY created DESC

Shortlists:

This sounds about right given the observed behaviour, of no longer getting back <crs>0</crs> when GeoTIFF cannot determine projection.

BEFORE:

this(new GridEnvelope2D(gridRange), getMathTransform(gridRange, userRange), null);

AFTER:

this( gridRange instanceof GridEnvelope2D ? (GridEnvelope2D) gridRange : new GridEnvelope2D(gridRange), userRange instanceof Envelope ? (Envelope) userRange : new Envelope2D(null, userRange));

Jody Garnett 
June 6, 2023 at 5:29 PM

I have updated the ticket title and description to indicate that this is not a regression. Ticket captures the discovery that there is no way to override srs when establishing a coverage store (even though that is possible using the REST API)

Won't Fix

Details

Assignee

Reporter

Affects versions

Priority

Created May 18, 2023 at 5:00 PM
Updated June 16, 2023 at 9:34 AM
Resolved June 14, 2023 at 2:35 PM