Jason Greenlaw created an issue |
REST API - GET JSON for ImageMosaic coverage returns improper value inside parameters.entry array |
Issue Type: |
Bug |
---|---|
Affects Versions: |
2.14.1 |
Assignee: |
Unassigned |
Attachments: |
conus.zip, exception.txt, get-json-response.json, get-xml-response.xml |
Components: |
image mosaic, REST |
Created: |
26/Feb/19 9:38 PM |
Environment: |
Docker/Alpine Linux 3.8.2, OpenJDK 1.8.0_191, Tomcat 8.5.37 |
Priority: |
Low |
Reporter: |
After creating a simple PostGIS-backed ImageMosaic from a directory of GeoTIFFs, performing a GET
with Content-Type: application/json
on the generated coverage resource, e.g.
returns a naked string (the nativeCoverageName
value, e.g. “imagemosaicname”) at the end of the coverage.parameters.entry
array, where an object/map is expected. get-json-response.json
By contrast, if XML is requested (using Content-Type: application/xml
), this value is instead returned inside a <nativeCoverageName>
element as a sibling of <parameters>
(rather than a descendant). get-xml-response.xml
If the unaltered GET
response JSON is pasted into a PUT
request to update the resource, it results an HTTP 500 error and an exception exception.txt. If this value is removed from the end of the coverage.parameters.entry
array before issuing the PUT
request, the PUT
succeeds.
Steps to reproduce exception look something like this:
- Extract
conus.zip
to desired data location (e.g. /path/to/conus) - Update PostGIS database connection information in
datastore.properties
- curl -XPOST -H “Content-type: application/json” -d ‘{“namespace”:{“prefix”:“obs”,“uri”:“http://obs”}}’ ‘http://localhost:8888/geoserver/rest/namespaces’
- curl -XPUT -H ‘Content-Type: text/plain’ -d ‘file:///path/to/conus’ ‘http://localhost:8888/geoserver/rest/workspaces/obs/coveragestores/mrms_basereflect_conus/external.imagemosaic?configure=all&coverageName=mrms_basereflect_conus’
- curl -XGET -H “Content-type: application/json” -H ‘Accept: application/json’ ‘http://localhost:8888/geoserver/rest/workspaces/obs/coveragestores/mrms_basereflect_conus/coverages/mrms_basereflect_conus’ > response.json
- curl -XPUT -H “Content-type: application/json” ‘http://localhost:8888/geoserver/rest/workspaces/obs/coveragestores/mrms_basereflect_conus/coverages/mrms_basereflect_conus’ --data-binary “@response.json”
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#100098-sha1:8896431) |