Hi all,

I am uploading tiff files to geoserver via rest, using:

curl -u admin:geoserver -v -XPUT -H 'Content-type: text/plain' \
        -d 'file:'“ + imageLocation + ”/“ + imageName + ” \

http://localhost:8080/geoserver/rest/workspaces/mag/coveragestores/imageName/external.geotiff?configure=first\&coverageName=";
+ coverageName

and that works fine.

What I would like to do now is set the OutputTransparentColor as well, so
that the black border of my images becomes transparent. (so setting it to
000000).

I saw this
http://osgeo-org.1560.x6.nabble.com/Reload-Mosaic-CoverageStore-Coverage-after-shp-properties-file-has-been-modified-td3803889.html
and at the bottom it says to do a REST PUT with all the parameters, however
that doesn’t work for me. this is what I have tried.

curl -u admin:geoserver -v -XPUT -H “Content-type: text/xml”
'<coverage><parameters><entry><string>AllowMultithreading</string><string>false</string></entry><entry><string>OutputTransparentColor</string><string></string></entry><entry><string>InputTransparentColor</string><string>000000</string></entry><entry><string>SUGGESTED_TILE_SIZE</string><string></string></entry><entry><string>InputImageThresholdValue</string><string>NaN</string></entry><entry><string>BackgroundValues</string><string>255</string></entry><entry><string>USE_JAI_IMAGEREAD</string><string>true</string></entry></parameters></coverage>'
http://localhost:8080/geoserver/rest/workspaces/mag/coveragestores/imageName/coverages/LC82020242014096MTI00_B432_enh.xml

I'm getting an unresolved host error, it’s trying to read the '<coverage…'
etc bit:
________________
* getaddrinfo(3) failed for
<coverage><parameters><entry><string>AllowMultithreading<:80
* Couldn’t resolve host
'<coverage><parameters><entry><string>AllowMultithreading<'
* Closing connection #0
curl: (6) Couldn’t resolve host
'<coverage><parameters><entry><string>AllowMultithreading<'
* About to connect() to localhost port 8080 (#0)
*   Trying 127.0.0.1… connected
* Server auth using Basic with user 'admin'
> PUT
/geoserver/rest/workspaces/mag/coveragestores/imageName/coverages/LC82020242014096MTI00_B432_enh.xml
HTTP/1.1
> Authorization: Basic YWRtaW46Z2Vvc2VydmVy
> User-Agent: curl/7.22.0 (i686-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1
zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost:8080
> Accept: */*
> Content-type: text/xml
>
< HTTP/1.1 500 Internal Server Error
< Server: Apache-Coyote/1.1
< Transfer-Encoding: chunked
< Date: Wed, 13 Aug 2014 08:42:46 GMT
< Connection: close
<
* Closing connection #0
 : input contained no data
_________________________

any ideas would be most welcome.

thanks

toby
------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to