Thanks for the link and the explanation. This was exactly what I was after.

This link works beautifully and provides the information we need.
 
http://www.aifdr.org:8080/geoserver/rest/workspaces/hazard/coveragestores/Lembang_Earthquake_Scenario/coverages/Lembang_Earthquake_Scenario.xml

However trying the recipe and going to this one
http://www.aifdr.org:8080/geoserver/rest/workspaces/hazard/coveragestores/Lembang_Earthquake_Scenario/
returns this page
Coverage Store "Lembang_Earthquake_Scenario"

 *   
Lembang_Earthquake_Scenario<http://www.aifdr.org:8080/geoserver/rest/workspaces/hazard/coveragestores/Lembang_Earthquake_Scenario/coveragestores/Lembang_Earthquake_Scenario.html>
But clicking on the above fails. This is what I tried earlier too. However, 
replacing the .html in the link with .xml does provide the information you 
mention.
Is that the correct procedure and intended?

Anyway, with the template above I should be able to generate the calls we need.

Many thanks
Ole

From: Chris Holmes [mailto:[email protected]]
Sent: Wednesday, 22 June 2011 10:41 AM
To: Ole Nielsen
Cc: [email protected]
Subject: Re: [Geoserver-users] How to get metadata such as the native bounding 
box for raster data through REST?

You want coverages instead of coveragetypes.  The base inspiration for the 
names is the WFS vs WCS specs, WFS calls layer categories featureTypes, WCS 
calls them coverages.

So  
http://www.aifdr.org:8080/geoserver/rest/workspaces/hazard/coveragestores/Lembang_Earthquake_Scenario/coverages/Lembang_Earthquake_Scenario.xml
works for me.

I think the GS rest is a bit confusing, as it'll generate some stuff that can 
throw you off a bit - I got a bit turned around navigating when putting in the 
wrong stuff.  But what you can generally do is go a level or two up and see the 
links it has under it.  So if you go to:

http://www.aifdr.org:8080/geoserver/rest/workspaces/hazard/coveragestores/Lembang_Earthquake_Scenario/

Then it'll point you at its list of coverages:

http://www.aifdr.org:8080/geoserver/rest/workspaces/hazard/coveragestores/Lembang_Earthquake_Scenario/coverages.xml

 Which then finally has the proper link with 'coverages'.

It'd probably be better if we didn't generate anything at all if you put in the 
wrong word for 'coverages'.  It looks like basically it matches anything and 
tries to generate the same stuff it would if you put it in correctly.  Not sure 
if that was by design, or just neglected to turn off one of the paths.

C

On Tue, Jun 21, 2011 at 10:23 PM, Ole Nielsen 
<[email protected]<mailto:[email protected]>> wrote:
Dear all

I am sure this is a simple problem, but I can't work out how to get the 
bounding box of a raster layer through REST.
I tried to mimic the approach used for vector data (see example below), but so 
far my attempts have only resulted in minimal data.

Here's the REST call which works for vector data
http://www.aifdr.org:8080/geoserver/rest/workspaces/boundaries/datastores/Province_Boundaries/featuretypes/Province_Boundaries.xml

And here are my attempts for raster data which don't work (although they do 
provide some output which I have included below):
http://www.aifdr.org:8080/geoserver/rest/workspaces/hazard/coveragestores/Lembang_Earthquake_Scenario/coveragetypes/Lembang_Earthquake_Scenario.xml
http://www.aifdr.org:8080/geoserver/rest/workspaces/hazard/coveragestores/Lembang_Earthquake_Scenario/coveragestores/Lembang_Earthquake_Scenario.xml


Please help point me to the correct magic.
Cheers and thanks
Ole

PS - the username password on the server above are the GeoServer default, so 
you can test the responses yourself.


---------------- Output -----------------------

http://www.aifdr.org:8080/geoserver/rest/workspaces/boundaries/datastores/Province_Boundaries/featuretypes/Province_Boundaries.xml

<featureType>
<name>Province_Boundaries</name>
<nativeName>Province_Boundaries</nativeName>
−
<namespace>
<name>boundaries</name>
<atom:link rel="alternate" 
href="http://www.aifdr.org:8080/geoserver/rest/namespaces/boundaries.xml"; 
type="application/xml"/>
</namespace>
<title>Province_Boundaries</title>
−
<nativeCRS>
GEOGCS["GCS_WGS_1984",
  DATUM["D_WGS_1984",
    SPHEROID["WGS_1984", 6378137.0, 298.257223563]],
  PRIMEM["Greenwich", 0.0],
  UNIT["degree", 0.017453292519943295],
  AXIS["Longitude", EAST],
  AXIS["Latitude", NORTH]]
</nativeCRS>
<srs>EPSG:4326</srs>
−
<nativeBoundingBox>
<minx>95.05966095200006</minx>
<maxx>141.00538235200008</maxx>
<miny>-10.99740996099996</miny>
<maxy>5.906883970000024</maxy>
<crs>EPSG:4326</crs>
</nativeBoundingBox>
−
<latLonBoundingBox>
<minx>95.05966095200006</minx>
<maxx>141.00538235200008</maxx>
<miny>-10.99740996099996</miny>
<maxy>5.906883970000024</maxy>
<crs>EPSG:4326</crs>
</latLonBoundingBox>
<projectionPolicy>NONE</projectionPolicy>
<enabled>true</enabled>
−
<store class="dataStore">
<name>Province_Boundaries</name>
<atom:link rel="alternate" 
href="http://www.aifdr.org:8080/geoserver/rest/workspaces/boundaries/datastores/Province_Boundaries.xml";
 type="application/xml"/>
</store>
<maxFeatures>0</maxFeatures>
<numDecimals>0</numDecimals>
</featureType>


----------------------------------------------------------------------------------
http://www.aifdr.org:8080/geoserver/rest/workspaces/hazard/coveragestores/Lembang_Earthquake_Scenario/coveragetypes/Lembang_Earthquake_Scenario.xml
<coverageStore>
<name>Lembang_Earthquake_Scenario</name>
<type>GeoTIFF</type>
<enabled>true</enabled>
−
<workspace>
<name>hazard</name>
<atom:link rel="alternate" 
href="http://www.aifdr.org:8080/geoserver/rest/workspaces/hazard.xml"; 
type="application/xml"/>
</workspace>
−
<url>
file:data/Lembang_Earthquake_Scenario/Lembang_Earthquake_Scenario.geotiff
</url>
−
<coverages>
<atom:link rel="alternate" 
href="http://www.aifdr.org:8080/geoserver/rest/workspaces/hazard/coveragestores/Lembang_Earthquake_Scenario/coveragetypes/Lembang_Earthquake_Scenario/coverages.xml";
 type="application/xml"/>
</coverages>
</coverageStore>

----------------------------------------------------------------------------------
http://www.aifdr.org:8080/geoserver/rest/workspaces/hazard/coveragestores/Lembang_Earthquake_Scenario/coveragestores/Lembang_Earthquake_Scenario.xml
<coverages>
−
<coverage>
<name>Lembang_Earthquake_Scenario</name>
<atom:link rel="alternate" 
href="http://www.aifdr.org:8080/geoserver/rest/workspaces/hazard/coveragestores/Lembang_Earthquake_Scenario/coveragestores/Lembang_Earthquake_Scenario/Lembang_Earthquake_Scenario.xml";
 type="application/xml"/>
</coverage>
</coverages>


------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
Geoserver-users mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/geoserver-users

------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to