Inna Janssen ( 
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3Ad8a10fa7-cfd4-42cc-b2e3-201962efbce4
 ) *created* an issue

GeoServer ( 
https://osgeo-org.atlassian.net/browse/GEOS?atlOrigin=eyJpIjoiNmEwYjgzNmJmMjI2NDkzZWEyNWQyOTc0N2I3YTVkMDMiLCJwIjoiaiJ9
 ) / Bug ( 
https://osgeo-org.atlassian.net/browse/GEOS-9740?atlOrigin=eyJpIjoiNmEwYjgzNmJmMjI2NDkzZWEyNWQyOTc0N2I3YTVkMDMiLCJwIjoiaiJ9
 ) GEOS-9740 ( 
https://osgeo-org.atlassian.net/browse/GEOS-9740?atlOrigin=eyJpIjoiNmEwYjgzNmJmMjI2NDkzZWEyNWQyOTc0N2I3YTVkMDMiLCJwIjoiaiJ9
 ) REST API: REPROJECT_TO_DECLARED Parameter is ignored ( 
https://osgeo-org.atlassian.net/browse/GEOS-9740?atlOrigin=eyJpIjoiNmEwYjgzNmJmMjI2NDkzZWEyNWQyOTc0N2I3YTVkMDMiLCJwIjoiaiJ9
 )

Issue Type: Bug Affects Versions: 2.14.4, 2.17.2 Assignee: Unassigned 
Components: REST Created: 21/Sep/20 9:54 AM Priority: Medium Reporter: Inna 
Janssen ( 
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3Ad8a10fa7-cfd4-42cc-b2e3-201962efbce4
 )

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[&quot;WGS 84&quot;, 
 DATUM[&quot;World Geodetic System 1984&quot;, 
   SPHEROID[&quot;WGS 84&quot;, 6378137.0, 298.257223563, 
AUTHORITY[&quot;EPSG&quot;,&quot;7030&quot;]], 
   AUTHORITY[&quot;EPSG&quot;,&quot;6326&quot;]], 
 PRIMEM[&quot;Greenwich&quot;, 0.0, 
AUTHORITY[&quot;EPSG&quot;,&quot;8901&quot;]], 
 UNIT[&quot;degree&quot;, 0.017453292519943295], 
 AXIS[&quot;Geodetic longitude&quot;, EAST], 
 AXIS[&quot;Geodetic latitude&quot;, NORTH], 
 AUTHORITY[&quot;EPSG&quot;,&quot;4326&quot;]]</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.

( 
https://osgeo-org.atlassian.net/browse/GEOS-9740#add-comment?atlOrigin=eyJpIjoiNmEwYjgzNmJmMjI2NDkzZWEyNWQyOTc0N2I3YTVkMDMiLCJwIjoiaiJ9
 ) Add Comment ( 
https://osgeo-org.atlassian.net/browse/GEOS-9740#add-comment?atlOrigin=eyJpIjoiNmEwYjgzNmJmMjI2NDkzZWEyNWQyOTc0N2I3YTVkMDMiLCJwIjoiaiJ9
 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( 
https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail
 ) or iOS ( 
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8
 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100146- 
sha1:b8bc65d )
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to