git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/EcologicalEngineGeoSpatialExtension@73220 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
7b2e24c705
commit
be571cdba8
|
@ -10,7 +10,7 @@ public class OGCFormatter {
|
|||
}
|
||||
|
||||
public static String getWcsUrl(String geoServerUrl, String layerName, String bbox) {
|
||||
return geoServerUrl + "/wcs?service=wcs&version=1.0.0" + "&request=GetCoverage&layers=" + layerName + "&CRS=EPSG:4326" + "&bbox=" + bbox + "&width=676&height=330&srs=EPSG:4326&format=geotiff";
|
||||
return geoServerUrl + "/wcs?service=wcs&version=1.0.0" + "&request=GetCoverage&coverage=" + layerName + "&CRS=EPSG:4326" + "&bbox=" + bbox + "&width=676&height=330&format=geotiff";
|
||||
}
|
||||
|
||||
public static String getWmsNetCDFUrl(String fileUrl, String layerName, String bbox) {
|
||||
|
@ -18,7 +18,7 @@ public class OGCFormatter {
|
|||
}
|
||||
|
||||
public static String getWcsNetCDFUrl(String fileUrl, String layerName, String bbox) {
|
||||
return fileUrl.replace("dodsC", "wcs") + "?service=wcs&version=1.0.0" + "&request=GetCoverage&layers=" + layerName + "&CRS=EPSG:4326" + "&bbox=" + bbox + "&srs=EPSG:4326&format=geotiff";
|
||||
return fileUrl.replace("dodsC", "wcs") + "?service=wcs&version=1.0.0" + "&request=GetCoverage&coverage=" + layerName + "&CRS=EPSG:4326" + "&bbox=" + bbox + "&width=676&height=330&format=geotiff";
|
||||
}
|
||||
|
||||
public static String buildBoundingBox(double x1, double y1, double x2, double y2) {
|
||||
|
@ -34,4 +34,11 @@ public class OGCFormatter {
|
|||
double y22 = y1 + tolerance;
|
||||
return OGCFormatter.buildBoundingBox(x11, y11, x22, y22);
|
||||
}
|
||||
|
||||
|
||||
public static void main(String [] args){
|
||||
//http://geoserver-dev.d4science-ii.research-infrastructures.eu/geoserver/wcs?service=WCS&version=1.0.0&request=GetCoverage&COVERAGE=aquamaps:WorldClimBio2&CRS=EPSG:4326&BBOX=-180,-90,180,90&WIDTH=640&HEIGHT=480&FORMAT=geotiff
|
||||
String wcs = getWcsUrl("http://geoserver-dev.d4science-ii.research-infrastructures.eu/geoserver", "aquamaps:WorldClimBio2", buildBoundingBox(-180, -85.5,180, 90));
|
||||
System.out.println(wcs);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue