boolean josmSupportsThisLayer = false;
for (String crs : crsList) {
josmSupportsThisLayer |= isProjSupported(crs);
}
Bounds bounds = null;
Element bboxElem = getChild(element, "EX_GeographicBoundingBox");
if (bboxElem != null) {
// Attempt to use EX_GeographicBoundingBox for bounding box
double left = Double.parseDouble(getChildContent(bboxElem, "westBoundLongitude", null, null));
double top = Double.parseDouble(getChildContent(bboxElem, "northBoundLatitude", null, null));
double right = Double.parseDouble(getChildContent(bboxElem, "eastBoundLongitude", null, null));
double bot = Double.parseDouble(getChildContent(bboxElem, "southBoundLatitude", null, null));
bounds = new Bounds(bot, left, top, right);
} else {
// If that's not available, try LatLonBoundingBox
bboxElem = getChild(element, "LatLonBoundingBox");
if (bboxElem != null) {
double left = Double.parseDouble(bboxElem.getAttribute("minx"));
double top = Double.parseDouble(bboxElem.getAttribute("maxy"));
double right = Double.parseDouble(bboxElem.getAttribute("maxx"));
double bot = Double.parseDouble(bboxElem.getAttribute("miny"));
bounds = new Bounds(bot, left, top, right);
}
}
List<Element> layerChildren = getChildren(element, "Layer");
List<LayerDetails> childLayers = parseLayers(layerChildren, crsList);