[Geoserver-devel] Adding new layer via rest

Hello,

I have created a new workspace, and coverage using rest, but having problems
with the data layer.

my workspace is aap_1 and the coverage is TestImage1.tiff

I have tried lots of variations of this:
curl -u user:password -XPUT -H 'Content-type: text/xml' -d
'<layer><defaultStyle><name>aap_1:TestImage1.tiff</name></defaultStyle></layer>'
http://54.235.xxx.x.x:8080/geoserver/rest/layers/aap_1:TestImage1.tiff

but it always returns No such layer. I understand there is no such
layer...as that is what
we are trying to accomplish...but don't understand why it won't add it.

Does anyone know what I am doing wrong?

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Adding-new-layer-via-rest-tp5093848.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.

Hi,

which commands did you use to publish the coverage?

You may also consider publishing the data in a single step, using a REST request like this:

curl -u admin:geoserver -XPUT --data-binary @c:\TestImage1.tiff http://54.235.xxx.xxx:8080/geoserver/rest/workspaces/aap_1/coveragestores/nameyouwant/file.geotiff

which will create a store called “nameyouwant” and add a coverage and a layer on top of your tiff data.

Daniele

···

== GeoSolutions will be closed for Christmas Holidays from 23/12/2013 to 06/01/2014 ==
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 Thu, Dec 12, 2013 at 5:51 AM, aap <n07rosman@anonymised.com> wrote:

Hello,

I have created a new workspace, and coverage using rest, but having problems
with the data layer.

my workspace is aap_1 and the coverage is TestImage1.tiff

I have tried lots of variations of this:
curl -u user:password -XPUT -H ‘Content-type: text/xml’ -d
‘aap_1:TestImage1.tiff’
http://54.235.xxx.x.x:8080/geoserver/rest/layers/aap_1:TestImage1.tiff

but it always returns No such layer. I understand there is no such
layer…as that is what
we are trying to accomplish…but don’t understand why it won’t add it.

Does anyone know what I am doing wrong?


View this message in context: http://osgeo-org.1560.x6.nabble.com/Adding-new-layer-via-rest-tp5093848.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.


Rapidly troubleshoot problems before they affect your business. Most IT
organizations don’t have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk


Geoserver-devel mailing list
Geoserver-devel@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel