Hi again,
If you want to create a new mosaic store, you should use a PUT like this:

curl -v -u admin:geoserver -XPUT -H "Content-type: text/plain" -d
"file://c:/data/mosaic" "
http://localhost:8080/geoserver/rest/workspaces/toby/coveragestores/poly-incremental/external.imagemosaic
"

Once done, you can afterwards add additional files to your store through
additional POSTs.

curl -v -u admin:geoserver -XPOST -H "Content-type: text/plain" -d
"*file://c:/data/morefiles/sample12.tif*"
"http://localhost:8080/geoserver/rest/workspaces/toby/coveragestores/poly-incremental/external.imagemosaic";

curl -v -u admin:geoserver -XPOST -H "Content-type: text/plain" -d
"*file://c:/data/morefiles/sample13.tif*"
"http://localhost:8080/geoserver/rest/workspaces/toby/coveragestores/poly-incremental/external.imagemosaic";

OR just add lot of files once by harvesting a whole folder:

curl -v -u admin:geoserver -XPOST -H "Content-type: text/plain" -d
"*file://c:/data/evenmorefiles/*"
"http://localhost:8080/geoserver/rest/workspaces/toby/coveragestores/poly-incremental/external.imagemosaic";


Please, let us know if you still have issues.
Hope this helps,
Daniele


==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.
==
Ing. Daniele Romagnoli
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

-------------------------------------------------------


On Wed, Oct 23, 2013 at 1:07 PM, Tobias Reinicke <[email protected]> wrote:

> Hi Daniele,
>
> The contents is just a list of geotiff files, so image1.tiff, image2.tiff
> . I have about 10 in there.
>
> Re post / put - I was just following the documentation [1]. :)
>
> Toby
>
>
> [1] http://docs.geoserver.org/stable/en/user/rest/examples/curl.html
>
>
> On 23 October 2013 11:56, Daniele Romagnoli <
> [email protected]> wrote:
>
>> Hi Tobias,
>> can you please list the content of your /data/mosaic folder?
>> Also note that you should use a PUT to create a coveragestore instead of
>> POST.
>>
>> Please, let us know.
>> Cheers,
>> Daniele
>>
>>
>>
>> ==
>> Our support, Your Success! Visit http://opensdi.geo-solutions.it for
>> more information.
>> ==
>> Ing. Daniele Romagnoli
>> 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
>>
>> -------------------------------------------------------
>>
>>
>> On Wed, Oct 23, 2013 at 12:28 PM, Tobias Reinicke <[email protected]>wrote:
>>
>>> <<Sorry for repost - have subscribed now>>
>>>
>>>
>>> Hello All,
>>>
>>> So I'm playing with the rest interface - and have managed to create a
>>> workspace and add a single tiff image layer by doing this:
>>>
>>> //create workspace
>>>     curl -v -u admin:geoserver -XPOST -H "Content-type: text/xml" -d
>>> "<workspace><name>toby</name></workspace>"
>>> http://localhost:8080/geoserver/rest/workspaces
>>>
>>> //create single image layer
>>>     curl -u admin:geoserver -XPUT -H "Content-type:image/tiff"
>>> --data-binary @/data/ndvi_color1.tif
>>> http://localhost:8080/geoserver/rest/workspaces/toby/coveragestores/ndvi_color1.tif/file.geotiff
>>>
>>> My data is local to the geoserver (ubuntu) in /data directory.
>>>
>>> Now I have multiple images in /data/mosaic that I want to add to a
>>> mosaic layer..
>>> I've been trying something like
>>> curl -v -u admin:geoserver -XPOST -H "Content-type: text/plain" -d
>>> "/data/mosaic" "
>>> http://localhost:8080/geoserver/rest/workspaces/toby/coveragestores/poly-incremental/external.imagemosaic
>>> "
>>>
>>> But that doesn't work - I get a 405 Method not allowed error.
>>>
>>> I've been reading on the web and they say something about uploading the
>>> index.shp file in order to be able to do this - is that true? If so how do
>>> I create that in the first place?
>>>
>>>
>>> Any help would be appreciated.
>>>
>>> Thanks
>>> Toby
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> October Webinars: Code for Performance
>>> Free Intel webinars can help you accelerate application performance.
>>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
>>> from
>>> the latest Intel processors and coprocessors. See abstracts and register
>>> >
>>>
>>> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Geoserver-users mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>>
>>>
>>
>
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to