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.
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).
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
. 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 -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"
Docker/Alpine Linux 3.8.2, OpenJDK 1.8.0_191, Tomcat 8.5.37