Hi Andrea - yes that was it, thanks. I wanted to post an answer but didn’t want to spam the list.
It also turns out that I don’t have to specify every parameter, just the one I want - so this works: “curl -u admin:geoserver -v -XPUT -H 'Content-type: text/xml' -d '<coverage><parameters><entry><string>InputTransparentColor</string><string>000000</string></entry></parameters><enabled>true</enabled></coverage>' \” http://localhost:8080/geoserver/rest/workspaces/mag/coveragestores/imageName/coverages/“ + coverageName + ”.xml\"" And yes, not about the “enabled” flag - not sure why updating the preferences 'disables’ the layer. Anyway - all good. Thanks Toby On 15 August 2014 15:43, Andrea Aime <[email protected]> wrote: > On Wed, Aug 13, 2014 at 10:48 AM, Tobias Reinicke <[email protected]> > wrote: > >> 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. >> > > You forgot to add "-d" before the xml contents of your resource (and > possibly also a <enabled>true</enabled> in the > xml contents) > > Cheers > Andrea > > -- > == > GeoServer Professional Services from the experts! Visit > http://goo.gl/NWWaa2 for more information. > == > > Ing. Andrea Aime > @geowolf > Technical Lead > > GeoSolutions S.A.S. > Via Poggio alle Viti 1187 > 55054 Massarosa (LU) > Italy > phone: +39 0584 962313 > fax: +39 0584 1660272 > mob: +39 339 8844549 > > http://www.geo-solutions.it > http://twitter.com/geosolutions_it > > ------------------------------------------------------- >
------------------------------------------------------------------------------
_______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
