[Geoserver-devel] [JIRA] (GEOS-9740) REST API: REPROJECT_TO_DECLARED Parameter is ignored

Inna Janssen created an issue

GeoServer / BugGEOS-9740

REST API: REPROJECT_TO_DECLARED Parameter is ignored

Issue Type:

BugBug

Affects Versions:

2.14.4, 2.17.2

Assignee:

Unassigned

Components:

REST

Created:

21/Sep/20 9:54 AM

Priority:

MediumMedium

Reporter:

Inna Janssen

When adding a new geotiff via REST API the REPROJECT_TO_DECLARED Parameter in the JSON or XML File is ignored.

Steps for reproducing:

Create a new geotiff coveragestore and layer via REST API using the command line:

curl -u admin:password -XPUT -d "file:///geotifftest.tiff" -H Content-type:"text/plain" http://mapserver:8080/geoserver/rest/workspaces/my/coveragestores/geotifftest/external.geotiff?configure=none

This successfully creates the coveragestore without creating a layer (configure=none).

create the layer:

curl -u admin:password -XPOST -d @geotifftest.xml -H Content-type:"text/xml" http://mapserver:8080/geoserver/rest/workspaces/my/coveragestores/geotifftest/coverages.xml

This creates a layer that uses the contents of geotifftest.xml which is:

<coverage>
  <name>geotifftest</name>
  <nativeName>geotifftest</nativeName>
  <title>geotifftest</title>
  <nativeCRS>GEOGCS["WGS 84", 
  DATUM["World Geodetic System 1984", 
    SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]], 
    AUTHORITY["EPSG","6326"]], 
  PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], 
  UNIT["degree", 0.017453292519943295], 
  AXIS["Geodetic longitude", EAST], 
  AXIS["Geodetic latitude", NORTH], 
  AUTHORITY["EPSG","4326"]]</nativeCRS>
  <srs>EPSG:3411</srs>
  <nativeBoundingBox>
    <minx>67.85481794548498</minx>
    <maxx>89.20866745173171</maxx>
    <miny>76.3294943493649</miny>
    <maxy>81.0710753525806</maxy>
    <crs>EPSG:4326</crs>
  </nativeBoundingBox>
  <latLonBoundingBox>
    <minx>67.85481794548498</minx>
    <maxx>89.20866745173171</maxx>
    <miny>76.3294943493649</miny>
    <maxy>81.0710753525806</maxy>
    <crs>EPSG:4326</crs>
  </latLonBoundingBox>
  <projectionPolicy>REPROJECT_TO_DECLARED</projectionPolicy>
  <enabled>true</enabled>
  <nativeFormat>GeoTIFF</nativeFormat>
  <supportedFormats>
    <string>GEOTIFF</string>
  </supportedFormats>
  <defaultInterpolationMethod>nearest neighbor</defaultInterpolationMethod>
</coverage>

In the created layer the projectionPolicy is set to FORCE_DECLARED and the SRS set to EPSG:4326.
I can manually set it to REPROJECT_TO_DECLARED in the GUI.

In geoserver version 2.11.5 everything works as expected.
It does not work with 2.14.4 and not with 2.17.2.

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#100146-sha1:b8bc65d)

Atlassian logo