//in order to return the file in original projection to the user (will also need to transform the bbox)
//all client bboxes should be passed as lat-lon coords. we will need to get the appropriate epsg code for the layer
//in order to return the file in original projection to the user
SolrRecord layerInfo = this.currentLayer.getLayerInfo();
BoundingBox nativeBounds = new BoundingBox(layerInfo.getMinX(), layerInfo.getMinY(), layerInfo.getMaxX(), layerInfo.getMaxY());
BoundingBox bounds = nativeBounds.getIntersection(this.currentLayer.getRequestedBounds());
String layerName = this.currentLayer.getLayerNameNS();
Map<String, String> describeLayerInfo = getWcsDescribeLayerInfo();
String epsgCode = describeLayerInfo.get("SRS");
String domainSubset = "";
//wcs requires this info, even for full extent
String gmlLow = describeLayerInfo.get("gridEnvelopeLow");
String gmlHigh = describeLayerInfo.get("gridEnvelopeHigh");
String axes = "";
if (describeLayerInfo.containsKey("axis1")){
axes += "<gml:axisName>";
axes += describeLayerInfo.get("axis1");
axes += "</gml:axisName>";
if (describeLayerInfo.containsKey("axis2")){
axes += "<gml:axisName>";
axes += describeLayerInfo.get("axis2");
axes += "</gml:axisName>";
}
}
domainSubset = "<domainSubset>"
+ "<spatialSubset>"
+ bounds.generateGMLEnvelope(4326)
+ "<gml:Grid dimension=\"2\">"
+ "<gml:limits>"
+ "<gml:GridEnvelope>"
+ "<gml:low>" + gmlLow + "</gml:low>"
+ "<gml:high>" + gmlHigh + "</gml:high>"