[Geoserver-devel] [JIRA] (GEOS-11033) REST API coverage.xml regression on handling of invalid ReferencedEnvelope

Jody Garnett created an issue

GeoServer / BugGEOS-11033

REST API coverage.xml regression on handling of invalid ReferencedEnvelope

Issue Type:

BugBug

Affects Versions:

2.22.2

Assignee:

Unassigned

Components:

REST

Created:

16/Jun/23 11:32 AM

Priority:

MediumMedium

Reporter:

Jody Garnett

Using a REST API script using a weakly typed language the difference between a string and an int resulted in a coverage.xml POST with following invalid ReferencedEnvelope crs:

<crs>0</crs>

In GeoServer 2.21.4 this was preserved:

<coverage>
  <name>ijssel_2017_dsm_5</name>
  <title>ijssel_2017_dsm_5</title>
  ...
  <nativeCRS class="projected">...</nativeCRS>
  <srs>EPSG:28992</srs>
  <projectionPolicy>FORCE_DECLARED</projectionPolicy>
  <nativeBoundingBox>
    <minx>180000</minx>
    <miny>437500</miny>
    <maxx>215000</maxx>
    <maxy>512500</maxy>
    <crs>0</crs>
  </nativeBoundingBox>
  <latLonBoundingBox>
    <minx>5.7511379908659</minx>
    <miny>51.9236999711892</miny>
    <maxx>6.27331655234198</maxx>
    <maxy>52.6005228787716</maxy>
    <crs>0</crs>
  </latLonBoundingBox>

In newer releases (GeoServer 2.24.x and 2.23.0, … GeoServer 2.22.2?) the ReferencedEnvelopes having no crs:

  <nativeCRS class="projected">...</nativeCRS>
  <srs>EPSG:28992</srs>
  <nativeBoundingBox>
    <minx>180000</minx>
    <miny>437500</miny>
    <maxx>215000</maxx>
    <maxy>512500</maxy>
  </nativeBoundingBox>
  <latLonBoundingBox>
    <minx>5.7511379908659</minx>
    <miny>51.9236999711892</miny>
    <maxx>6.27331655234198</maxx>
    <maxy>52.6005228787716</maxy>
  </latLonBoundingBox>

While this does not look like a significant change … select WCS operations have trouble:

  • WCS 1.0.x DescribeCoverage is fine
  • WCS 1.1.x DescribeCoverage has a translate error
  • WCS 2.0.x DescribeCoverage has a translate error
java.lang.NullPointerException: Cannot invoke "org.opengis.referencing.crs.CoordinateReferenceSystem.getCoordinateSystem()" because "crs" is null
javax.xml.transform.TransformerException: Translator error
Translator error
Unexpected error occurred during describe coverage xml encoding
java.lang.NullPointerException: Cannot invoke "org.opengis.referencing.crs.CoordinateReferenceSystem.getCoordinateSystem()" because "crs" is null
Cannot invoke "org.opengis.referencing.crs.CoordinateReferenceSystem.getCoordinateSystem()" because "crs" is null

I can only assume that some WCS code paths are ignoring the coverage.xml <srs>EPSG:28992</srs> setting and trusting the native information to be correct and available.

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100227-sha1:5147d46)

Atlassian logo