Hi Tam,

2014-02-12 6:04 GMT+01:00 tt5430 <tt9...@gmail.com>:

> All,
>
> I am trying to find a way for the users to upload files such as GeoTiff,
> kml, etc. from client machine onto GeoServer workspace and wondering
> whether
> I can use GeoServer REST PUT operation for that.
>
> Below is an example of the REST PUT operation using curl taken from
> GeoServer's REST examples.
>
> curl -v -u admin:geoserver -XPUT -H "Content-type: application/zip"
>   --data-binary @roads.zip
>
>
> http://localhost:8080/geoserver/rest/workspaces/acme/datastores/roads/file.shp
>
>  I known that "@roads.zip" indicates the zip file to be uploaded.  But
> where
> is the file?  Is it it relative to some path?
>

It is relative to the path you are launching curl from. You can also
specify an absolute path.


> and what is the last line?  Is it always "http://localhost:8080/geoserver
> "?
>

It is the url of the geoserver you need to configure with the new
shapefile. That one is the default url when you install the standalone
geoserver locally on your PC.
Do you have a geoserver installed on some server?


> I could not find any examples from the internet showing how to use REST PUT
> to upload files from client machine.  Can some clarify this?  If it can be
> done with GeoServer REST API, I greatly appreciated an example in curl.
>

On the same page you found the shapefile example (
http://docs.geoserver.org/latest/en/user/rest/examples/curl.html), you can
find other examples  for other types of data.
In this other documentation page (
http://docs.geoserver.org/latest/en/user/rest/) you can find a reference
for all the supported rest requests. For example to upload a geotiff you
will need a coveragestore PUT request.


Cheers,
Mauro



-- 
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.
==

Dott. Mauro Bartolomeoli
@mauro_bart
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to