[Geoserver-users] REST Configuration API

Justin,

By the way, I am actually PUTing the image to the server and NOT
POSTing.

I keep getting this error when I try to upload a png or jpg:

14 Apr 10:00:08 INFO [catalog.rest] - PUT file, mimetype: image/jpeg
14 Apr 10:00:08 INFO [catalog.rest] - Using existing coverage store:
blah
14 Apr 10:00:08 ERROR [geoserver.rest] - Error auto-configuring
coverage:Unsupported file format
14 Apr 10:00:22 INFO [catalog.rest] - PUT file, mimetype: image/png
14 Apr 10:00:22 INFO [catalog.rest] - Using existing coverage store:
blah
14 Apr 10:00:22 ERROR [geoserver.rest] - Error auto-configuring
coverage:Unsupported file format

When I try to upload a GeoTiff, I always get the following error:

14 Apr 10:03:49 INFO [catalog.rest] - PUT file, mimetype: image/tif
14 Apr 10:03:49 INFO [catalog.rest] - Using existing coverage store:
blah
14 Apr 10:03:49 ERROR [geoserver.rest] - Error auto-configuring
coverage:java.lang.NullPointerException

I hope that helps in debugging the situation.

Thanks a million!!

Ronak Patel

-----Original Message-----
From: Patel, Ronak Avinash (US SSA)
Sent: Tuesday, April 14, 2009 9:50 AM
To: 'Justin Deoliveira'
Cc: geoserver-users@lists.sourceforge.net; Froumis, James A (US SSA)
Subject: RE: [Geoserver-users] REST Configuration API

Justin,

I desperately tried all day yesterday to try to POST a coverage and get
Geoserver to accept my image (a GeoTiff).

I am POSTing to a CoverageStore and Workspace that I create using the
REST API.

I am POSTing the following:

URL:
/geoserver/rest/workspaces/testWorkspace/coveragestores/testStore/file.g
eotiff

POST ContentType image/tif and the POST content is the file.

I noticed that if I set the configure=none&coverageName=test flags in
the URL, then the file is ingested by Geoserver without complaining.

When I don't set these cgi parameters, things fail and complain.

Why does this happen?

Also, do I have to create a layer to host the image in the WMS? Or is
this done automatically?

Thanks a million!!

Ronak Patel