131 fix: expose nativeCRS attribue of a resource
This commit is contained in:
parent
ba8f17c5b1
commit
f406757ec4
@ -110,6 +110,10 @@ public class RESTResource {
|
||||
return atom.getAttributeValue("href");
|
||||
}
|
||||
|
||||
public String getNativeCRS() {
|
||||
return rootElem.getChildText("nativeCRS");
|
||||
}
|
||||
|
||||
public String getCRS() {
|
||||
Element elBBox = rootElem.getChild("latLonBoundingBox");
|
||||
return elBBox.getChildText("crs");
|
||||
|
||||
@ -81,6 +81,17 @@ public class ResourceDecoderTest {
|
||||
"http://localhost:8080/geoserver/rest/workspaces/topp/coveragestores/granuleTestMosaic.xml");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNativeCRS() {
|
||||
String expectedCrs = "GEOGCS[\"WGS 84\", \r\n DATUM[\"World Geodetic\n System 1984\", \r\n"
|
||||
+" SPHEROID[\"WGS 84\", 6378137.0,\n 298.257223563,\n AUTHORITY[\"EPSG\",\"7030\"]], \r\n"
|
||||
+" AUTHORITY[\"EPSG\",\"6326\"]], \r\n PRIMEM[\"Greenwich\", 0.0,\n AUTHORITY[\"EPSG\",\"8901\"]], \r\n"
|
||||
+" UNIT[\"degree\", 0.017453292519943295], \r\n AXIS[\"Geodetic longitude\", EAST], \r\n"
|
||||
+" AXIS[\"Geodetic\n latitude\", NORTH], \r\n AUTHORITY[\"EPSG\",\"4326\"]]";
|
||||
|
||||
Assert.assertEquals(expectedCrs, coverage.getNativeCRS());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCRS() {
|
||||
Assert.assertEquals(coverage.getCRS(), "EPSG:4326");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user