While trying to update an existing ImageMosaic in GeoServer using the REST API, following the documentation (provided here http://docs.geoserver.org/stable/en/user/rest/examples/curl.html#uploading-and-modifying-a-image-mosaic)

using the following command

curl -u admin:geoserver -XPOST -H "Content-type: text/plain" -d "file:///path/to/file/img.tiff" "http://localhost:8080/geoserver/rest/workspaces/opengeo/coveragestores/klicfinal/external.imagemosaic"

I get an empty response, while my ImageMosaic remains un-updated. Does anyone have a clue as to what could be causing this?

EDIT: I've already tried using the recalculate parameter. Furthermore, after closer examination, the shapefile of the imagemosaic has been updated and already shows the location and the reference to the new geotiff file. However, the newly added image does not show up in the WMS layer preview, even after disabling caching.

Even the GML that you can get using http://localhost:8080/geoserver/rest/workspaces/opengeo/coveragestores/klicfinal/coverages/klicfinal/index/granules.xml? shows the updated reference to the newly uploaded GeoTIFF.

Hostname was NOT found in DNS cache
Connected to localhost ( port 8080 (#0)
Server auth using Basic with user 'admin'
POST /geoserver/rest/workspaces/opengeo/coveragestores/klicfinal/external.imagemosaic HTTP/1.1
Authorization: Basic YWRtaW46Z2Vvc2VydmVy
User-Agent: curl/7.35.0
Host: localhost:8080
Accept: */*
Content-type: text/plain
Content-Length: 83

upload completely sent off: 83 out of 83 bytes
HTTP/1.1 202 Accepted
Date: Tue, 11 Apr 2017 14:33:17 GMT
Server Noelios-Restlet-Engine/1.0..8 is not blacklisted
Server: Noelios-Restlet-Engine/1.0..8
Transfer-Encoding: chunked

Connection #0 to host localhost left intact
  • what does the log file say happened? try turning up the logging level if you can't find anything useful. – Ian Turton Apr 12 '17 at 7:58
  • possible duplicate of gis.stackexchange.com/questions/207460/… – Ian Turton Apr 12 '17 at 8:00
  • I've already tried the recalculate parameter in the question that you linked to. Will try to look at the log file next. Furthermore, the shapefile of that imagemosaic has been updated and already shows the location and the reference to the new geotiff file. However, they do not show up in the WMS, even after disabling caching. – S Hook Apr 12 '17 at 8:25
  • please edit the question to add this new information - so it basically works but doesn't show up – Ian Turton Apr 12 '17 at 8:26

This seems to be https://osgeo-org.atlassian.net/browse/GEOT-5833 however you don't specify which version of GeoServer you're running, so impossible to be sure (has been fixed since 2.11.3 and 2.12.0).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.