Hi,

Thanks for your responses.

@Peter The problem is that the raster files are uploaded by other process
to the server and we
don't know their metadata beforehand nor we have the possibility to use a
GUI manually for each of them.

@Andrea Thanks, I should have read the doc more carefully... That's great,
with 'external' the metadata gets loaded automatically. The only thing is
that the layer name is taken from the file name. Is it possible to specify
the name of the resulting layer in the same request?

Regards.

2016-11-11 14:18 GMT+01:00 Andrea Aime <[email protected]>:

> As far as I know, you have to change the way you're creating the coverage
> store,
> using the "external" syntax similar to this example configuring a
> shapefile that's
> already on disk:
>
> http://docs.geoserver.org/latest/en/user/rest/examples/
> curl.html#adding-an-existing-shapefile
>
> Sorry I don't have an example for raster data handy (if anybody reading
> has one, there's
> a guide for quick documentation contributions here:
> http://docs.geoserver.org/latest/en/docguide/quickfix.html )
>
> Cheers
> Andrea
>
>
> On Fri, Nov 11, 2016 at 1:32 PM, Víctor González <
> [email protected]> wrote:
>
>> Hi,
>>
>> I'm loading a new GeoTIFF layer using REST by adding a new coveragestore
>> and coverage (requests below). After that, the layer does not have
>> information about bands and I have to use the "Reload band definitions"
>> option in the web GUI to load them manually (because I don't know the
>> raster metadata and I cannot include it in the request).
>>
>> Why is the band information not loaded automatically? Is it possible to
>> load it programmatically without using the web GUI?
>>
>> I'm using 2.9.1.
>>
>> $ curl -u admin:geoserver -XPOST http://localhost:8080/geoserve
>> r/rest/workspaces/files/coveragestores.json -H "Content-Type:
>> application/json" --data '{
>>   "coverageStore" : {
>>     "name" : "myraster",
>>     "type" : "GeoTIFF",
>>     "enabled" : true,
>>     "workspace" : {
>>       "name" : "files"
>>     },
>>     "url" : "file:test.tif"
>>   }
>> }'
>>
>> $ curl -u admin:geoserver -XPOST http://localhost:8080/geoserve
>> r/rest/workspaces/files/coveragestores/myraster/coverages.json -H
>> "Content-Type: application/json" --data '{
>>   "coverage" : {
>>     "name" : "myraster",
>>     "enabled" : true,
>>     "store" : {
>>       "name" : "files:myraster"
>>     }
>>   }
>> }'
>>
>> Best regards.
>>
>> --
>> Víctor González
>> http://geomati.co
>>
>> ------------------------------------------------------------
>> ------------------
>> Developer Access Program for Intel Xeon Phi Processors
>> Access to Intel Xeon Phi processor-based developer platforms.
>> With one year of Intel Parallel Studio XE.
>> Training and support from Colfax.
>> Order your platform today. http://sdm.link/xeonphi
>> _______________________________________________
>> Geoserver-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
>>
>
>
> --
> ==
> GeoServer Professional Services from the experts! Visit
> http://goo.gl/it488V for more information.
> ==
>
> Ing. Andrea Aime
> @geowolf
> Technical Lead
>
> GeoSolutions S.A.S.
> Via di Montramito 3/A
> 55054  Massarosa (LU)
> phone: +39 0584 962313
> fax: +39 0584 1660272
> mob: +39  339 8844549
>
> http://www.geo-solutions.it
> http://twitter.com/geosolutions_it
>
> *AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*
>
> Le informazioni contenute in questo messaggio di posta elettronica e/o
> nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
> loro utilizzo è consentito esclusivamente al destinatario del messaggio,
> per le finalità indicate nel messaggio stesso. Qualora riceviate questo
> messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
> darcene notizia via e-mail e di procedere alla distruzione del messaggio
> stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
> divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
> utilizzarlo per finalità diverse, costituisce comportamento contrario ai
> principi dettati dal D.Lgs. 196/2003.
>
>
>
> The information in this message and/or attachments, is intended solely for
> the attention and use of the named addressee(s) and may be confidential or
> proprietary in nature or covered by the provisions of privacy act
> (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
> Code).Any use not in accord with its purpose, any disclosure, reproduction,
> copying, distribution, or either dissemination, either whole or partial, is
> strictly forbidden except previous formal approval of the named
> addressee(s). If you are not the intended recipient, please contact
> immediately the sender by telephone, fax or e-mail and delete the
> information in this message that has been received in error. The sender
> does not give any warranty or accept liability as the content, accuracy or
> completeness of sent messages and accepts no responsibility  for changes
> made after they were sent or for other risks which arise as a result of
> e-mail transmission, viruses, etc.
>
> -------------------------------------------------------
>



-- 
Víctor González
http://geomati.co
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to