I've been able to upload a geotiff coverage to geoserver via REST & cURL but regardless of what I try I cannot get the coverage to be stored in the 'coverages' directory. Both of the following sets of commands result in a new directory under data_dir/data being created. Even if I specify URL for the coverageStore, it gets over-written when I load the image.

The images are loaded and are viewable but they're not strictly where they're meant to be. I'd prefer to keep vector & raster files separate.

Anyone with any ideas how to upload the images to the 'coverages' directory?


SINGLE STEP COMMAND (LOAD IMAGE DIRECTLY)
curl -u admin:geoserver -XPUT -H "Content-type:image/tiff"   \
    --data-binary @imgtest_01.tif   \
http://localhost/gs221/rest/workspaces/niihau/coveragestores/imgtest_01/file.geotiff

TWO-STEP COMMAND (CREATE COVERAGESTORE THEN LOAD IMAGE)
curl -u admin:geoserver -v -XPOST -H "Content-type: application/xml"   \
-d "<coverageStore><name>imgtest_9</name><workspace>niihau</workspace><enabled>true</enabled></coverageStore>" \
    http://localhost/gs221/rest/workspaces/niihau/coveragestores
curl -u admin:geoserver -v -XPUT -H "Content-type: image/tiff"   \
    --data-binary @imgtest_9.tif   \
http://localhost/gs221/rest/workspaces/niihau/coveragestores/imgtest_9/file.geotiff

OUTPUT FROM RUNNING SINGLE STEP COMMAND
<coverageStore>
  <name>imgtest_01</name>
  <type>GeoTIFF</type>
  <enabled>true</enabled>
  <workspace>
    <name>niihau</name>
<href>http://localhost/gs221/rest/workspaces/niihau.xml</href>
  </workspace>
  <__default>false</__default>
<url>file:data/niihau/imgtest_01/imgtest_01.geotiff</url>
  <coverages>
<atom:link xmlns:atom="http://www.w3.org/2005/Atom"; rel="alternate" href="ht
tp://localhost/gs221/rest/workspaces/niihau/coveragestores/imgtest_01/file/cover
ages.xml" type="application/xml"/>
  </coverages>
</coverageStore>



 Richard "Abe" Coughlin

SPATIAL DATA & APPLICATIONS SPECIALIST
*Pacific Islands Ocean Observing System*
*University of Hawaii 1-808-956-0822 *
www.pacioos.org <http://www.pacioos.org>
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122912
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to