[Geoserver-users] RESTful geotiff uploading

I spent some time figuring out how to upload geotiff coverages to geoserver using the RESTful config module, and was able to do so successfully, but I had some questions about the the organization of the resulting resources under /rest.

I uploaded the tif using the url action like this:

url -T sat_url.txt -v -XPUT --basic --user admin:geoserver http://localhost:8080/geoserver/rest/folders/AutoPublish/layers/SatIR/url.geotiff

The sat_url.txt file had the following contents:

file:/Users/pete/dev/geoserver-1.7.1/data_dir/coverages/SatData/Satellite_Image.tif

Since I published to /rest/folders/AutoPublish/layers/SatIR/, I would expect to see a folder named AutoPublish, and a layer named SatIR, but instead I see the new resource at /rest/folders/data/layers/AutoPublish.

Where did this folder called ‘data’ come from? Maybe I just don’t understand the layout. I’d like to be able to programatically delete the layers, but I don’t know what resource URI to delete. As far as I understand it, being RESTful means that I should be able to use the same URI to perform different operations on the same resource.

-Pete

Hi Pete,

What you say makes sense. When you upload a resource I would think the same base uri would be used to delete it, access information about it, etc..

The rest config stuff is still experimental so it could just be that this was overlooked. Or perhaps there is a good reason, David (the original author) should be able to better comment.

-Justin

Pete Schwamb wrote:

I spent some time figuring out how to upload geotiff coverages to geoserver using the RESTful config module, and was able to do so successfully, but I had some questions about the the organization of the resulting resources under /rest.

I uploaded the tif using the url action like this:

url -T sat_url.txt -v -XPUT --basic --user admin:geoserver http://localhost:8080/geoserver/rest/folders/AutoPublish/layers/SatIR/url.geotiff

The sat_url.txt file had the following contents:

file:/Users/pete/dev/geoserver-1.7.1/data_dir/coverages/SatData/Satellite_Image.tif

Since I published to /rest/folders/AutoPublish/layers/SatIR/, I would expect to see a folder named AutoPublish, and a layer named SatIR, but instead I see the new resource at /rest/folders/data/layers/AutoPublish.

Where did this folder called 'data' come from? Maybe I just don't understand the layout. I'd like to be able to programatically delete the layers, but I don't know what resource URI to delete. As far as I understand it, being RESTful means that I should be able to use the same URI to perform different operations on the same resource.

-Pete

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

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

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

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

Well, the folders/{folder}/layers/{layer}/url.{format} endpoint has been
added since the last time I took a close look at the RESTConfig module,
so I'm not 100% familiar with its usage. However, for looking up
coverage configurations in a GET request, the {folder} parameter is
interpreted as a "virtual folder." This is basically the name of the
directory for filesystem-backed data/coveragestores and the name of the
datastore for others. For configuration of existing data/coveragestores
you should use this convention. In this case specifically, you should
DELETE /rest/folders/data/layers/AutoPublish .

I believe that the 'data' folder arose from the fact that the url
endpoint actually fetches the specified file and saves it in the data
directory, regardless of whether it's a local file or not. Simone
(cc'ed) would know more.

Hope this helps,
David Winslow

On Fri, 2009-01-02 at 12:57 -0600, Pete Schwamb wrote:

I spent some time figuring out how to upload geotiff coverages to
geoserver using the RESTful config module, and was able to do so
successfully, but I had some questions about the the organization of
the resulting resources under /rest.

I uploaded the tif using the url action like this:

url -T sat_url.txt -v -XPUT --basic --user
admin:geoserver http://localhost:8080/geoserver/rest/folders/AutoPublish/layers/SatIR/url.geotiff

The sat_url.txt file had the following contents:

file:/Users/pete/dev/geoserver-1.7.1/data_dir/coverages/SatData/Satellite_Image.tif

Since I published to /rest/folders/AutoPublish/layers/SatIR/, I would
expect to see a folder named AutoPublish, and a layer named SatIR, but
instead I see the new resource
at /rest/folders/data/layers/AutoPublish.

Where did this folder called 'data' come from? Maybe I just don't
understand the layout. I'd like to be able to programatically delete
the layers, but I don't know what resource URI to delete. As far as I
understand it, being RESTful means that I should be able to use the
same URI to perform different operations on the same resource.

-Pete
------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Cool, thanks for clarifying David.

Looking at the folder structure I don't quite understand it much either. It seems more or less to be just a reflection of whats on disk when working with shapefile and geotiff formats. Which is sort of a divergence of what we mapped out before. Perhaps Simone can enlighten further.

David Winslow wrote:

Well, the folders/{folder}/layers/{layer}/url.{format} endpoint has been
added since the last time I took a close look at the RESTConfig module,
so I'm not 100% familiar with its usage. However, for looking up
coverage configurations in a GET request, the {folder} parameter is
interpreted as a "virtual folder." This is basically the name of the
directory for filesystem-backed data/coveragestores and the name of the
datastore for others. For configuration of existing data/coveragestores
you should use this convention. In this case specifically, you should
DELETE /rest/folders/data/layers/AutoPublish .

I believe that the 'data' folder arose from the fact that the url
endpoint actually fetches the specified file and saves it in the data
directory, regardless of whether it's a local file or not. Simone
(cc'ed) would know more.

Hope this helps,
David Winslow

On Fri, 2009-01-02 at 12:57 -0600, Pete Schwamb wrote:

I spent some time figuring out how to upload geotiff coverages to
geoserver using the RESTful config module, and was able to do so
successfully, but I had some questions about the the organization of
the resulting resources under /rest.

I uploaded the tif using the url action like this:

url -T sat_url.txt -v -XPUT --basic --user
admin:geoserver http://localhost:8080/geoserver/rest/folders/AutoPublish/layers/SatIR/url.geotiff

The sat_url.txt file had the following contents:

file:/Users/pete/dev/geoserver-1.7.1/data_dir/coverages/SatData/Satellite_Image.tif

Since I published to /rest/folders/AutoPublish/layers/SatIR/, I would
expect to see a folder named AutoPublish, and a layer named SatIR, but
instead I see the new resource
at /rest/folders/data/layers/AutoPublish.

Where did this folder called 'data' come from? Maybe I just don't
understand the layout. I'd like to be able to programatically delete
the layers, but I don't know what resource URI to delete. As far as I
understand it, being RESTful means that I should be able to use the
same URI to perform different operations on the same resource.

-Pete
------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

Yes, that helps explain things, although it seems to be a pretty significant departure from RESTful semantics.

Thanks,

-Pete

On Jan 2, 2009, at 2:05 PM, David Winslow wrote:

Well, the folders/{folder}/layers/{layer}/url.{format} endpoint has been
added since the last time I took a close look at the RESTConfig module,
so I'm not 100% familiar with its usage. However, for looking up
coverage configurations in a GET request, the {folder} parameter is
interpreted as a "virtual folder." This is basically the name of the
directory for filesystem-backed data/coveragestores and the name of the
datastore for others. For configuration of existing data/coveragestores
you should use this convention. In this case specifically, you should
DELETE /rest/folders/data/layers/AutoPublish .

I believe that the 'data' folder arose from the fact that the url
endpoint actually fetches the specified file and saves it in the data
directory, regardless of whether it's a local file or not. Simone
(cc'ed) would know more.

Hope this helps,
David Winslow

On Fri, 2009-01-02 at 12:57 -0600, Pete Schwamb wrote:

I spent some time figuring out how to upload geotiff coverages to
geoserver using the RESTful config module, and was able to do so
successfully, but I had some questions about the the organization of
the resulting resources under /rest.

I uploaded the tif using the url action like this:

url -T sat_url.txt -v -XPUT --basic --user
admin:geoserver http://localhost:8080/geoserver/rest/folders/AutoPublish/layers/SatIR/url.geotiff

The sat_url.txt file had the following contents:

file:/Users/pete/dev/geoserver-1.7.1/data_dir/coverages/SatData/Satellite_Image.tif

Since I published to /rest/folders/AutoPublish/layers/SatIR/, I would
expect to see a folder named AutoPublish, and a layer named SatIR, but
instead I see the new resource
at /rest/folders/data/layers/AutoPublish.

Where did this folder called 'data' come from? Maybe I just don't
understand the layout. I'd like to be able to programatically delete
the layers, but I don't know what resource URI to delete. As far as I
understand it, being RESTful means that I should be able to use the
same URI to perform different operations on the same resource.

-Pete
------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Note that the REST API is far from set in stone, it's still a community module, so this kind of feedback is great. If you'd like to propose a scheme that's more restful that would be great, and we could likely retool the module to follow that. Once we actually release it as part of GeoServer it's going to be harder to change the API around, since people will start to rely on it. But at this point no one has done a full review, so thanks a bunch for the feedback.

Chris

Pete Schwamb wrote:

Yes, that helps explain things, although it seems to be a pretty significant departure from RESTful semantics.

Thanks,

-Pete

On Jan 2, 2009, at 2:05 PM, David Winslow wrote:

Well, the folders/{folder}/layers/{layer}/url.{format} endpoint has been
added since the last time I took a close look at the RESTConfig module,
so I'm not 100% familiar with its usage. However, for looking up
coverage configurations in a GET request, the {folder} parameter is
interpreted as a "virtual folder." This is basically the name of the
directory for filesystem-backed data/coveragestores and the name of the
datastore for others. For configuration of existing data/ coveragestores
you should use this convention. In this case specifically, you should
DELETE /rest/folders/data/layers/AutoPublish .

I believe that the 'data' folder arose from the fact that the url
endpoint actually fetches the specified file and saves it in the data
directory, regardless of whether it's a local file or not. Simone
(cc'ed) would know more.

Hope this helps,
David Winslow

On Fri, 2009-01-02 at 12:57 -0600, Pete Schwamb wrote:

I spent some time figuring out how to upload geotiff coverages to
geoserver using the RESTful config module, and was able to do so
successfully, but I had some questions about the the organization of
the resulting resources under /rest.

I uploaded the tif using the url action like this:

url -T sat_url.txt -v -XPUT --basic --user
admin:geoserver http://localhost:8080/geoserver/rest/folders/AutoPublish/layers/SatIR/url.geotiff

The sat_url.txt file had the following contents:

file:/Users/pete/dev/geoserver-1.7.1/data_dir/coverages/SatData/ Satellite_Image.tif

Since I published to /rest/folders/AutoPublish/layers/SatIR/, I would
expect to see a folder named AutoPublish, and a layer named SatIR, but
instead I see the new resource
at /rest/folders/data/layers/AutoPublish.

Where did this folder called 'data' come from? Maybe I just don't
understand the layout. I'd like to be able to programatically delete
the layers, but I don't know what resource URI to delete. As far as I
understand it, being RESTful means that I should be able to use the
same URI to perform different operations on the same resource.

-Pete
------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Chris Holmes
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Whoops, didn't mean to point a finger at Simone. The 'virtual folder' concept is something I implemented shortly before I stopped working on the RESTConfig module; it was suggested by some folks here at OpenGeo as a possible direction to move in for the purpose of simplifying the complexity of the REST API. It hasn't really been pushed very hard in 'real world' use, and in general I'm quite open to redesign suggestions for the API.

I would agree that PUTting a URL to one path and having it create a resource at a different path is not very restful, especially since I don't think GeoServer keeps track of the URL that was originally sent, so you have a successful PUT to a resource that will 404 immediately afterward. However, I'm not really sure what the proper HTTP phrasing of that request (fetch a resource from URL x and publish it as URL y) would look like. As a first guess I would say:
POST /folders/f/layers?datasource=<url-encoded url to data source>&name=<layer name to be fudged as needed by geoserver>

Where the query parameters might be form-encoded instead of sent in the address field.

--
David Winslow

Justin Deoliveira wrote:

Cool, thanks for clarifying David.

Looking at the folder structure I don't quite understand it much either. It seems more or less to be just a reflection of whats on disk when working with shapefile and geotiff formats. Which is sort of a divergence of what we mapped out before. Perhaps Simone can enlighten further.

David Winslow wrote:
  

Well, the folders/{folder}/layers/{layer}/url.{format} endpoint has been
added since the last time I took a close look at the RESTConfig module,
so I'm not 100% familiar with its usage. However, for looking up
coverage configurations in a GET request, the {folder} parameter is
interpreted as a "virtual folder." This is basically the name of the
directory for filesystem-backed data/coveragestores and the name of the
datastore for others. For configuration of existing data/coveragestores
you should use this convention. In this case specifically, you should
DELETE /rest/folders/data/layers/AutoPublish .

I believe that the 'data' folder arose from the fact that the url
endpoint actually fetches the specified file and saves it in the data
directory, regardless of whether it's a local file or not. Simone
(cc'ed) would know more.

Hope this helps,
David Winslow

On Fri, 2009-01-02 at 12:57 -0600, Pete Schwamb wrote:
    

I spent some time figuring out how to upload geotiff coverages to
geoserver using the RESTful config module, and was able to do so
successfully, but I had some questions about the the organization of
the resulting resources under /rest.

I uploaded the tif using the url action like this:

url -T sat_url.txt -v -XPUT --basic --user
admin:geoserver http://localhost:8080/geoserver/rest/folders/AutoPublish/layers/SatIR/url.geotiff

The sat_url.txt file had the following contents:

file:/Users/pete/dev/geoserver-1.7.1/data_dir/coverages/SatData/Satellite_Image.tif

Since I published to /rest/folders/AutoPublish/layers/SatIR/, I would
expect to see a folder named AutoPublish, and a layer named SatIR, but
instead I see the new resource
at /rest/folders/data/layers/AutoPublish.

Where did this folder called 'data' come from? Maybe I just don't
understand the layout. I'd like to be able to programatically delete
the layers, but I don't know what resource URI to delete. As far as I
understand it, being RESTful means that I should be able to use the
same URI to perform different operations on the same resource.

-Pete
------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
      

------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
    

Yeah, I think all that is needed is to go over it once again and try to finalize an api. Up until now it has just been what David came up with (which is a great start), and some brainstorming at the sprint last year in Italy, and some with Tim and the javascript team. Add in to the mix a new configuration api its understandable that is not polished at this point.

But good feedback. I hope this coming week to really go over whats there , improve the test coverage, and hopefully finalize an api in preparation to moving it to supported.

-Justin

Chris Holmes wrote:

Note that the REST API is far from set in stone, it's still a community module, so this kind of feedback is great. If you'd like to propose a scheme that's more restful that would be great, and we could likely retool the module to follow that. Once we actually release it as part of GeoServer it's going to be harder to change the API around, since people will start to rely on it. But at this point no one has done a full review, so thanks a bunch for the feedback.

Chris

Pete Schwamb wrote:

Yes, that helps explain things, although it seems to be a pretty significant departure from RESTful semantics.

Thanks,

-Pete

On Jan 2, 2009, at 2:05 PM, David Winslow wrote:

Well, the folders/{folder}/layers/{layer}/url.{format} endpoint has been
added since the last time I took a close look at the RESTConfig module,
so I'm not 100% familiar with its usage. However, for looking up
coverage configurations in a GET request, the {folder} parameter is
interpreted as a "virtual folder." This is basically the name of the
directory for filesystem-backed data/coveragestores and the name of the
datastore for others. For configuration of existing data/ coveragestores
you should use this convention. In this case specifically, you should
DELETE /rest/folders/data/layers/AutoPublish .

I believe that the 'data' folder arose from the fact that the url
endpoint actually fetches the specified file and saves it in the data
directory, regardless of whether it's a local file or not. Simone
(cc'ed) would know more.

Hope this helps,
David Winslow

On Fri, 2009-01-02 at 12:57 -0600, Pete Schwamb wrote:

I spent some time figuring out how to upload geotiff coverages to
geoserver using the RESTful config module, and was able to do so
successfully, but I had some questions about the the organization of
the resulting resources under /rest.

I uploaded the tif using the url action like this:

url -T sat_url.txt -v -XPUT --basic --user
admin:geoserver http://localhost:8080/geoserver/rest/folders/AutoPublish/layers/SatIR/url.geotiff

The sat_url.txt file had the following contents:

file:/Users/pete/dev/geoserver-1.7.1/data_dir/coverages/SatData/ Satellite_Image.tif

Since I published to /rest/folders/AutoPublish/layers/SatIR/, I would
expect to see a folder named AutoPublish, and a layer named SatIR, but
instead I see the new resource
at /rest/folders/data/layers/AutoPublish.

Where did this folder called 'data' come from? Maybe I just don't
understand the layout. I'd like to be able to programatically delete
the layers, but I don't know what resource URI to delete. As far as I
understand it, being RESTful means that I should be able to use the
same URI to perform different operations on the same resource.

-Pete
------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

I'm coming from a Rails background, and am not very familiar with geoserver internals, so might be off-base, but I was expecting something like the following.

Just going from the geoserver user interface it seems that there are six types of resources that might be exposed via the rest api.

Namespaces
CoverageStores
DataStores
Styles
FeatureTypes
Coverages

And assuming that CoverageStores contain Coverages, and DataStores contain FeatureTypes (is this a true assumption?), then we have a set of "resources" like this:

/namespaces
/coverage_stores/<store_id>/coverages/<coverageid>
/data_stores/<store_id>/features/<feature_id>
/styles

So to upload a new geotiff, to a directory named img_sample, with a layer name of satellite_image, you would do this:

PUT /rest/coverage_stores/img_sample/coverages/satellite_image.tiff

You could also get the geotiff back by performing a GET to that URL.

If you wanted to publish a geotiff via a url, you would set the Content-Type to text/url or something like that, and the body of the PUT would be a URL pointing to the geotiff, but I would send the HTTP request to the same URI used above.

One question that remains in my mind is if the actual data of the coverage (TIFF, grib, etc) and its configuration information (srid, bounding box) are treated as separate resources and put at different URIs, or if they can be accessed and updated as different representations of the same resource. I think I lean towards the latter interpretation: then all data relating to a coverage would exist at a single URI. Accessing different 'representations' of that coverage could be done with the Content-Type: and Accepts: headers, or the file extension, or even with url parameters.

-Pete

On Jan 2, 2009, at 2:55 PM, David Winslow wrote:

Whoops, didn't mean to point a finger at Simone. The 'virtual folder'
concept is something I implemented shortly before I stopped working on
the RESTConfig module; it was suggested by some folks here at OpenGeo as
a possible direction to move in for the purpose of simplifying the
complexity of the REST API. It hasn't really been pushed very hard in
'real world' use, and in general I'm quite open to redesign suggestions
for the API.

I would agree that PUTting a URL to one path and having it create a
resource at a different path is not very restful, especially since I
don't think GeoServer keeps track of the URL that was originally sent,
so you have a successful PUT to a resource that will 404 immediately
afterward. However, I'm not really sure what the proper HTTP phrasing
of that request (fetch a resource from URL x and publish it as URL y)
would look like. As a first guess I would say:
POST /folders/f/layers?datasource=<url-encoded url to data
source>&name=<layer name to be fudged as needed by geoserver>

Where the query parameters might be form-encoded instead of sent in the
address field.

--
David Winslow

Justin Deoliveira wrote:

Cool, thanks for clarifying David.

Looking at the folder structure I don't quite understand it much either.
It seems more or less to be just a reflection of whats on disk when
working with shapefile and geotiff formats. Which is sort of a
divergence of what we mapped out before. Perhaps Simone can enlighten
further.

David Winslow wrote:

Well, the folders/{folder}/layers/{layer}/url.{format} endpoint has been
added since the last time I took a close look at the RESTConfig module,
so I'm not 100% familiar with its usage. However, for looking up
coverage configurations in a GET request, the {folder} parameter is
interpreted as a "virtual folder." This is basically the name of the
directory for filesystem-backed data/coveragestores and the name of the
datastore for others. For configuration of existing data/coveragestores
you should use this convention. In this case specifically, you should
DELETE /rest/folders/data/layers/AutoPublish .

I believe that the 'data' folder arose from the fact that the url
endpoint actually fetches the specified file and saves it in the data
directory, regardless of whether it's a local file or not. Simone
(cc'ed) would know more.

Hope this helps,
David Winslow

On Fri, 2009-01-02 at 12:57 -0600, Pete Schwamb wrote:

I spent some time figuring out how to upload geotiff coverages to
geoserver using the RESTful config module, and was able to do so
successfully, but I had some questions about the the organization of
the resulting resources under /rest.

I uploaded the tif using the url action like this:

url -T sat_url.txt -v -XPUT --basic --user
admin:geoserver http://localhost:8080/geoserver/rest/folders/AutoPublish/layers/SatIR/url.geotiff

The sat_url.txt file had the following contents:

file:/Users/pete/dev/geoserver-1.7.1/data_dir/coverages/SatData/Satellite_Image.tif

Since I published to /rest/folders/AutoPublish/layers/SatIR/, I would
expect to see a folder named AutoPublish, and a layer named SatIR, but
instead I see the new resource
at /rest/folders/data/layers/AutoPublish.

Where did this folder called 'data' come from? Maybe I just don't
understand the layout. I'd like to be able to programatically delete
the layers, but I don't know what resource URI to delete. As far as I
understand it, being RESTful means that I should be able to use the
same URI to perform different operations on the same resource.

-Pete
------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Continuing this thread on the developers' mailing list.

Justin Deoliveira wrote:

Yeah, I think all that is needed is to go over it once again and try to finalize an api. Up until now it has just been what David came up with (which is a great start), and some brainstorming at the sprint last year in Italy, and some with Tim and the javascript team. Add in to the mix a new configuration api its understandable that is not polished at this point.

But good feedback. I hope this coming week to really go over whats there , improve the test coverage, and hopefully finalize an api in preparation to moving it to supported.

-Justin

Chris Holmes wrote:

Note that the REST API is far from set in stone, it's still a community module, so this kind of feedback is great. If you'd like to propose a scheme that's more restful that would be great, and we could likely retool the module to follow that. Once we actually release it as part of GeoServer it's going to be harder to change the API around, since people will start to rely on it. But at this point no one has done a full review, so thanks a bunch for the feedback.

Chris

Pete Schwamb wrote:

Yes, that helps explain things, although it seems to be a pretty significant departure from RESTful semantics.

Thanks,

-Pete

On Jan 2, 2009, at 2:05 PM, David Winslow wrote:

Well, the folders/{folder}/layers/{layer}/url.{format} endpoint has been
added since the last time I took a close look at the RESTConfig module,
so I'm not 100% familiar with its usage. However, for looking up
coverage configurations in a GET request, the {folder} parameter is
interpreted as a "virtual folder." This is basically the name of the
directory for filesystem-backed data/coveragestores and the name of the
datastore for others. For configuration of existing data/ coveragestores
you should use this convention. In this case specifically, you should
DELETE /rest/folders/data/layers/AutoPublish .

I believe that the 'data' folder arose from the fact that the url
endpoint actually fetches the specified file and saves it in the data
directory, regardless of whether it's a local file or not. Simone
(cc'ed) would know more.

Hope this helps,
David Winslow

On Fri, 2009-01-02 at 12:57 -0600, Pete Schwamb wrote:

I spent some time figuring out how to upload geotiff coverages to
geoserver using the RESTful config module, and was able to do so
successfully, but I had some questions about the the organization of
the resulting resources under /rest.

I uploaded the tif using the url action like this:

url -T sat_url.txt -v -XPUT --basic --user
admin:geoserver http://localhost:8080/geoserver/rest/folders/AutoPublish/layers/SatIR/url.geotiff

The sat_url.txt file had the following contents:

file:/Users/pete/dev/geoserver-1.7.1/data_dir/coverages/SatData/ Satellite_Image.tif

Since I published to /rest/folders/AutoPublish/layers/SatIR/, I would
expect to see a folder named AutoPublish, and a layer named SatIR, but
instead I see the new resource
at /rest/folders/data/layers/AutoPublish.

Where did this folder called 'data' come from? Maybe I just don't
understand the layout. I'd like to be able to programatically delete
the layers, but I don't know what resource URI to delete. As far as I
understand it, being RESTful means that I should be able to use the
same URI to perform different operations on the same resource.

-Pete
------------------------------------------------------------------------------

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

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

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Dear list,
I managed to upload a GeoTiff via REST without letting GeoServer making a
local copy in the data/ directory.
I did this by means of the 'external' keywork, e.g.:

curl -u $USER:$PASSWORD -XPUT -H 'Content-type: text/plain' -d
'file:/path/to/my.geo.tif'
http://$HOST:$PORT/geoserver/rest/workspaces/$WORKSPACE/coveragestores/my.geo.tif/external.geotiff

In this case the name of the coverageStore is "my.geo.tif", whereas the name
of the coverage and the published layer is turned into "my.geo".
Is this somehow part of the philosophy of the REST configuration, or is this
a bug?

I recover the correct name information by PUTting this to the coverage,
e.g.:

curl -u $USER:$PASSWORD -XPUT -H 'Content-type: text/xml' -d
'<coverage><name>my.geo.tif</name><title>my.geo.tif</title><metadata><entry
key="dirName">my.geo.tif_my.geo.tif</entry></metadata><enabled>true</enabled></coverage>'
http://$HOST:$PORT/geoserver/rest/workspaces/$WORKSPACE/coveragestores/my.geo.tif/coverages/my.geo.tif

This way, I can visualize the map, but I hope not to bring some inconsistent
configuration beneath the surface.
Thanks for the help.
Regards,
Piero

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/RESTful-geotiff-uploading-tp6116966p6377678.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hello Piero,

I will check the issue reported as soon as possible and give you feedbacks on that.

Thanks,
Alessio.


Ing. Alessio Fabiani
Founder / CTO GeoSolutions S.A.S.

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: (+39) 0584 96.23.13
fax: (+39) 0584 96.23.13
mobile:(+39) 331 62.33.686

http://www.geo-solutions.it
http://geo-solutions.blogspot.com
http://www.linkedin.com/in/alessiofabiani
http://twitter.com/geosolutions_it

On Wed, May 18, 2011 at 2:54 PM, Piero Campa <piero.campa@anonymised.com> wrote:

Dear list,
I managed to upload a GeoTiff via REST without letting GeoServer making a
local copy in the data/ directory.
I did this by means of the ‘external’ keywork, e.g.:

curl -u $USER:$PASSWORD -XPUT -H ‘Content-type: text/plain’ -d
‘file:/path/to/my.geo.tif’
http://$HOST:$PORT/geoserver/rest/workspaces/$WORKSPACE/coveragestores/my.geo.tif/external.geotiff

In this case the name of the coverageStore is “my.geo.tif”, whereas the name
of the coverage and the published layer is turned into “my.geo”.
Is this somehow part of the philosophy of the REST configuration, or is this
a bug?

I recover the correct name information by PUTting this to the coverage,
e.g.:

curl -u $USER:$PASSWORD -XPUT -H ‘Content-type: text/xml’ -d
‘my.geo.tifmy.geo.tifmy.geo.tif_my.geo.tiftrue’
http://$HOST:$PORT/geoserver/rest/workspaces/$WORKSPACE/coveragestores/my.geo.tif/coverages/my.geo.tif

This way, I can visualize the map, but I hope not to bring some inconsistent
configuration beneath the surface.
Thanks for the help.
Regards,
Piero


View this message in context: http://osgeo-org.1803224.n2.nabble.com/RESTful-geotiff-uploading-tp6116966p6377678.html
Sent from the GeoServer - User mailing list archive at Nabble.com.


What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its
next-generation tools to help Windows* and Linux* C/C++ and Fortran
developers boost performance applications - including clusters.
http://p.sf.net/sfu/intel-dev2devmay


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

Hi,
I have done the following steps:

  1. creation of a new WMS store
  2. publish of one of its layer
  3. preview of this layer
    The third action produces the exception: “Error rendering coverage on the fast path java.lang.NullPointerException null”

Here is the stack trace:

org.geoserver.platform.ServiceException: Error rendering coverage on the fast path
at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:292)
at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:208)
at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:123)
at org.geoserver.wms.GetMap.run(GetMap.java:461)
at org.geoserver.wms.GetMap.run(GetMap.java:110)
at org.geoserver.wms.DefaultWebMapService.getMap(DefaultWebMapService.java:352)
at sun.reflect.GeneratedMethodAccessor265.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.geoserver.gwc.wms.CachingWebMapService.invoke(CachingWebMapService.java:51)
at org.geoserver.gwc.wms.CachingWebMapService.invoke(CachingWebMapService.java:33)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.geoserver.ows.util.RequestObjectLogger.invoke(RequestObjectLogger.java:51)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy26.getMap(Unknown Source)
at sun.reflect.GeneratedMethodAccessor264.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.geoserver.ows.Dispatcher.execute(Dispatcher.java:624)
at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:229)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:23)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:68)
at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
at org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:174)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
at org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHttp(RememberMeProcessingFilter.java:116)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
at org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:278)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:192)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:192)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:99)
at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:99)
at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:394)
at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:99)
at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
at org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:174)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:192)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:185)
at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:64)
at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:39)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:394)
at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
at org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:174)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:185)
at org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:71)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:183)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:41)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:46)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.geoserver.platform.ServiceException: java.lang.NullPointerException
at org.geoserver.wms.map.RenderedImageMapOutputFormat.directRasterRender(RenderedImageMapOutputFormat.java:871)
at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:290)
… 142 more
Caused by: java.lang.NullPointerException
at org.geotools.coverage.grid.GeneralGridEnvelope.(GeneralGridEnvelope.java:199)
at org.geotools.coverage.grid.GridCoverageFactory.create(GridCoverageFactory.java:512)
at org.geotools.coverage.grid.GridCoverageFactory.create(GridCoverageFactory.java:455)
at org.geotools.map.WMSCoverageReader.getMap(WMSCoverageReader.java:290)
at org.geotools.map.WMSCoverageReader.read(WMSCoverageReader.java:271)
at org.geoserver.wms.map.RenderedImageMapOutputFormat.readBestCoverage(RenderedImageMapOutputFormat.java:1284)
at org.geoserver.wms.map.RenderedImageMapOutputFormat.directRasterRender(RenderedImageMapOutputFormat.java:811)
… 143 more

Can you help me, please?

Thanks a lot,

···

Marianna Borriello
Solution Developer
Direzione Innovazione Tecnologica
marianna.borriello@anonymised.com

Engineering Ingegneria Informatica spa
Via Terragneta, 90 - 80058 Torre Annunziata (Na)
Tel. +39-081.862 68 65
Fax. +39-081.862 68 19
www.eng.it

On Wed, May 18, 2011 at 3:52 PM, Marianna Borriello <marianna.borriello@anonymised.com> wrote:

Hi,
I have done the following steps:

  1. creation of a new WMS store
  2. publish of one of its layer
  3. preview of this layer
    The third action produces the exception: “Error rendering coverage on the fast path java.lang.NullPointerException null”

WMS cascading is pretty new, it has been tested with GeoServer and MapServer instances so far.
Judging by the stack trace it seems GeoServer has troubles parsing the capabilities document of that cascaded
WMS.
Is the server available to the public? To see what’s going on we need to debug GS as it tries to cascade that server

Cheers
Andrea

Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584 962313
fax: +39 0584 962313

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf


On May 18, 2011, at 7:54 AM, Piero Campa wrote:

Dear list,
I managed to upload a GeoTiff via REST without letting GeoServer making a
local copy in the data/ directory.
I did this by means of the 'external' keywork, e.g.:

curl -u $USER:$PASSWORD -XPUT -H 'Content-type: text/plain' -d
'file:/path/to/my.geo.tif'
http://$HOST:$PORT/geoserver/rest/workspaces/$WORKSPACE/coveragestores/my.geo.tif/external.geotiff

I submitted a documentation patch to add information on the 'external' method, but it hasn't been acted on yet.
http://jira.codehaus.org/browse/GEOS-3966

In this case the name of the coverageStore is "my.geo.tif", whereas the name
of the coverage and the published layer is turned into "my.geo".
Is this somehow part of the philosophy of the REST configuration, or is this
a bug?

You can specify a name for your coverage using syntax like:
  http://$HOST:$PORT/geoserver/rest/workspaces/$WORKSPACE/coveragestores/my.geo.tif/external.geotiff?coverageName=my.geo.tif

This 'coverageName' parameter is used to name both the coverage and the resulting layer.

Also FYI:
We have noticed that a layer created in this way does not have a style set up correctly. The layer is OK when initially created, but after a GeoServer restart any attempt to view the layer results in a GeoServer exception.

We have worked around this problem by always updating the layer (to specify a style) after it has been created.

curl -u $USER:$PASSWORD -XPUT -H 'Content-type: text/xml' -d \
  '<layer><enabled>true</enabled><defaultStyle><name>raster</name></defaultStyle></layer>' \
  http://$HOST:$PORT/geoserver/rest/layers/my.geo.tif.xml

Hope that helps.

alex

Great Alex, this a useful.
I would link to this other topic [1] too.

Finally, a couple more questions:

- in your documentation patch, Alex, you also add "configure=first" to the
query string: what does that parameter do in practice?

- this is not that much important for me, however when you configure the
"coverageName" in the query string, the TITLE of the coverage is
automatically set (and in my case, we're back again to the problem that the
last ".tif" part of the coverage name is cut out in the title).
Is there a parameter that can edit the title in the query string, without
having to PUT it on an other REST request? (I tried with 'coverageTitle', or
just 'title', with no success apparently).

E.g.

http://$HOST:$PORT/geoserver/rest/workspaces/$WORKSPACE/coveragestores/my.geo.tif/external.geotiff?coverageName=my.geo.tif&coverageTitle=my.geo.tif

Thank you again.
Cheers.
Piero

[1]
http://osgeo-org.1803224.n2.nabble.com/rest-create-coverage-store-and-coverage-with-a-custom-layer-name-td6128093.html#a6128096
http://osgeo-org.1803224.n2.nabble.com/rest-create-coverage-store-and-coverage-with-a-custom-layer-name-td6128093.html#a6128096

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/RESTful-geotiff-uploading-tp6116966p6378535.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Great Alex, this is useful.
I would link to this other topic too:
http://osgeo-org.1803224.n2.nabble.com/rest-create-coverage-store-and-coverage-with-a-custom-layer-name-td6128093.html#a6128096

Finally, a couple more questions:

- in your documentation patch, Alex, you also add "configure=first" to the
query string: what does that parameter do in practice?

- this is not that much important for me, however when you configure the
"coverageName" in the query string, the TITLE of the coverage is
automatically set (and in my case, we're back again to the problem that the
last ".tif" part of the coverage name is cut out in the title).
Is there a parameter that can edit the title in the query string, without
having to PUT it on an other REST request? (I tried with 'coverageTitle', or
just 'title', with no success apparently). E.g:

http://$HOST:$PORT/geoserver/rest/workspaces/$WORKSPACE/coveragestores/my.geo.tif/external.geotiff?coverageName=my.geo.tif&coverageTitle=my.geo.tif

Thank you again.
Cheers.
Piero

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/RESTful-geotiff-uploading-tp6116966p6378546.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Dear Andrea,
unfortunately the geoserver instance I’m running is deployed on a machine not available to the public (we are under a secured proxy).
But I deployed the stable geoserver war and to do my tests I added as wms store the wms of my geoserver (i.e. the capabilities url is: http://localhost:8080/geoserver/wms?service=wms&request=GetCapabilities).
Could this be useful for your test?

Cheers,
Marianna

···

Marianna Borriello
Solution Developer
Direzione Innovazione Tecnologica
marianna.borriello@anonymised.com

Engineering Ingegneria Informatica spa
Via Terragneta, 90 - 80058 Torre Annunziata (Na)
Tel. +39-081.862 68 65
Fax. +39-081.862 68 19
www.eng.it

On Wed, May 18, 2011 at 3:52 PM, Marianna Borriello <marianna.borriello@anonymised.com> wrote:

Hi,
I have done the following steps:

  1. creation of a new WMS store
  2. publish of one of its layer
  3. preview of this layer
    The third action produces the exception: “Error rendering coverage on the fast path java.lang.NullPointerException null”

WMS cascading is pretty new, it has been tested with GeoServer and MapServer instances so far.
Judging by the stack trace it seems GeoServer has troubles parsing the capabilities document of that cascaded
WMS.
Is the server available to the public? To see what’s going on we need to debug GS as it tries to cascade that server

Cheers
Andrea

Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584 962313
fax: +39 0584 962313

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf


On Wed, May 18, 2011 at 7:00 PM, Marianna Borriello <marianna.borriello@anonymised.com> wrote:

Dear Andrea,
unfortunately the geoserver instance I’m running is deployed on a machine not available to the public (we are under a secured proxy).
But I deployed the stable geoserver war and to do my tests I added as wms store the wms of my geoserver (i.e. the capabilities url is: http://localhost:8080/geoserver/wms?service=wms&request=GetCapabilities).
Could this be useful for your test?

Not sure if I understand. I don’t need access to the GeoServer that is giving you the error, but to the
remote WMS that you’re trying to cascade, from my machine (using my GeoServer, and having it
running in a debugger to see what’s going on).
If I cannot have access to that one there is little chance I can track down the problem.

Cheers
Andrea

Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584 962313
fax: +39 0584 962313

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf


I’m trying to cascade the wms of my running geoserver (i.e. the same wms url of my geoserver)

Cheers
Marianna

···

Marianna Borriello
Solution Developer
Direzione Innovazione Tecnologica
marianna.borriello@anonymised.com

Engineering Ingegneria Informatica spa
Via Terragneta, 90 - 80058 Torre Annunziata (Na)
Tel. +39-081.862 68 65
Fax. +39-081.862 68 19
www.eng.it

On Wed, May 18, 2011 at 7:00 PM, Marianna Borriello <marianna.borriello@anonymised.com> wrote:

Dear Andrea,
unfortunately the geoserver instance I’m running is deployed on a machine not available to the public (we are under a secured proxy).
But I deployed the stable geoserver war and to do my tests I added as wms store the wms of my geoserver (i.e. the capabilities url is: http://localhost:8080/geoserver/wms?service=wms&request=GetCapabilities).
Could this be useful for your test?

Not sure if I understand. I don’t need access to the GeoServer that is giving you the error, but to the
remote WMS that you’re trying to cascade, from my machine (using my GeoServer, and having it
running in a debugger to see what’s going on).
If I cannot have access to that one there is little chance I can track down the problem.

Cheers
Andrea

Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584 962313
fax: +39 0584 962313

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf