On May 18, 2011, at 7:54 AM, Piero Campa wrote: > Dear list, > I managed to upload a GeoTiff via REST without letting GeoServer making a > local copy in the data/ directory. > I did this by means of the 'external' keywork, e.g.: > >> curl -u $USER:$PASSWORD -XPUT -H 'Content-type: text/plain' -d >> 'file:/path/to/my.geo.tif' >> http://$HOST:$PORT/geoserver/rest/workspaces/$WORKSPACE/coveragestores/my.geo.tif/external.geotiff
I submitted a documentation patch to add information on the 'external' method, but it hasn't been acted on yet. http://jira.codehaus.org/browse/GEOS-3966 > > In this case the name of the coverageStore is "my.geo.tif", whereas the name > of the coverage and the published layer is turned into "my.geo". > Is this somehow part of the philosophy of the REST configuration, or is this > a bug? You can specify a name for your coverage using syntax like: http://$HOST:$PORT/geoserver/rest/workspaces/$WORKSPACE/coveragestores/my.geo.tif/external.geotiff?coverageName=my.geo.tif This 'coverageName' parameter is used to name both the coverage and the resulting layer. Also FYI: We have noticed that a layer created in this way does not have a style set up correctly. The layer is OK when initially created, but after a GeoServer restart any attempt to view the layer results in a GeoServer exception. We have worked around this problem by always updating the layer (to specify a style) after it has been created. curl -u $USER:$PASSWORD -XPUT -H 'Content-type: text/xml' -d \ '<layer><enabled>true</enabled><defaultStyle><name>raster</name></defaultStyle></layer>' \ http://$HOST:$PORT/geoserver/rest/layers/my.geo.tif.xml Hope that helps. alex ------------------------------------------------------------------------------ What Every C/C++ and Fortran developer Should Know! Read this article and learn how Intel has extended the reach of its next-generation tools to help Windows* and Linux* C/C++ and Fortran developers boost performance applications - including clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
