defNS).addContent(Double.toString(geo.getLatSouth()))); geoElem.addContent(new Element("Northernmost_Latitude", defNS).addContent(Double.toString(geo.getLatNorth())));
rootElem.addContent( geoElem); geoElem.addContent( new Element("Southernmost_Latitude", defNS).addContent( Double.toString(geo.getLatSouth()))); geoElem.addContent( new Element("Northernmost_Latitude", defNS).addContent(Double.toString(geo.getLatNorth()))); geoElem.addContent( new Element("Westernmost_Latitude", defNS).addContent(Double.toString(geo.getLonWest())));
defNS).addContent(Double.toString(geo.getLatSouth()))); geoElem.addContent(new Element("Northernmost_Latitude", defNS).addContent(Double.toString(geo.getLatNorth())));
defNS).addContent(Double.toString(geo.getLatSouth()))); geoElem.addContent(new Element("Northernmost_Latitude", defNS).addContent(Double.toString(geo.getLatNorth())));
rootElem.addContent( geoElem); geoElem.addContent( new Element("Southernmost_Latitude", defNS).addContent( Double.toString(geo.getLatSouth()))); geoElem.addContent( new Element("Northernmost_Latitude", defNS).addContent(Double.toString(geo.getLatNorth()))); geoElem.addContent( new Element("Westernmost_Latitude", defNS).addContent(Double.toString(geo.getLonWest())));
rootElem.addContent( geoElem); geoElem.addContent( new Element("Southernmost_Latitude", defNS).addContent( Double.toString(geo.getLatSouth()))); geoElem.addContent( new Element("Northernmost_Latitude", defNS).addContent(Double.toString(geo.getLatNorth()))); geoElem.addContent( new Element("Westernmost_Latitude", defNS).addContent(Double.toString(geo.getLonWest())));
protected Element writeGeospatialCoverage(ThreddsMetadata.GeospatialCoverage gc) { Element geos = new Element("geospatialCoverages", defNS); Element geo = new Element("geospatialCoverage", defNS); geos.addContent( geo); Element body = new Element("body", defNS); geo.addContent( body); body.addContent( new Element("planet", defNS).addContent("Earth")); geo.addContent( new Element("geodeticDatumGlobalOrHorz", defNS).addContent("DLESE:WGS84")); geo.addContent( new Element("projection", defNS).setAttribute("type", "DLESE:Unknown")); geo.addContent( new Element("coordinateSystem", defNS).setAttribute("type", "DLESE:Geographic latitude and longitude")); Element bb = new Element("boundBox", defNS); geo.addContent( bb); double west = LatLonPointImpl.lonNormal(gc.getLonWest()); double east = LatLonPointImpl.lonNormal(gc.getLonEast()); bb.addContent( new Element("westCoord", defNS).setText( ucar.unidata.util.Format.dfrac( west, 2))); bb.addContent( new Element("eastCoord", defNS).setText( ucar.unidata.util.Format.dfrac( east, 2))); bb.addContent( new Element("northCoord", defNS).setText( ucar.unidata.util.Format.dfrac( gc.getLatNorth(), 2))); bb.addContent( new Element("southCoord", defNS).setText( ucar.unidata.util.Format.dfrac( gc.getLatSouth(), 2))); bb.addContent( new Element("bbSrcName", defNS).setText( "Calculated from dataset coordinate system by CDM/THREDDS")); return geos; }
protected Element writeGeospatialCoverage(ThreddsMetadata.GeospatialCoverage gc) { Element geos = new Element("geospatialCoverages", defNS); Element geo = new Element("geospatialCoverage", defNS); geos.addContent( geo); Element body = new Element("body", defNS); geo.addContent( body); body.addContent( new Element("planet", defNS).addContent("Earth")); geo.addContent( new Element("geodeticDatumGlobalOrHorz", defNS).addContent("DLESE:WGS84")); geo.addContent( new Element("projection", defNS).setAttribute("type", "DLESE:Unknown")); geo.addContent( new Element("coordinateSystem", defNS).setAttribute("type", "DLESE:Geographic latitude and longitude")); Element bb = new Element("boundBox", defNS); geo.addContent( bb); double west = LatLonPointImpl.lonNormal(gc.getLonWest()); double east = LatLonPointImpl.lonNormal(gc.getLonEast()); bb.addContent( new Element("westCoord", defNS).setText( ucar.unidata.util.Format.dfrac( west, 2))); bb.addContent( new Element("eastCoord", defNS).setText( ucar.unidata.util.Format.dfrac( east, 2))); bb.addContent( new Element("northCoord", defNS).setText( ucar.unidata.util.Format.dfrac( gc.getLatNorth(), 2))); bb.addContent( new Element("southCoord", defNS).setText( ucar.unidata.util.Format.dfrac( gc.getLatSouth(), 2))); bb.addContent( new Element("bbSrcName", defNS).setText( "Calculated from dataset coordinate system by CDM/THREDDS")); return geos; }
protected Element writeGeospatialCoverage(ThreddsMetadata.GeospatialCoverage gc) { Element geos = new Element("geospatialCoverages", defNS); Element geo = new Element("geospatialCoverage", defNS); geos.addContent( geo); Element body = new Element("body", defNS); geo.addContent( body); body.addContent( new Element("planet", defNS).addContent("Earth")); geo.addContent( new Element("geodeticDatumGlobalOrHorz", defNS).addContent("DLESE:WGS84")); geo.addContent( new Element("projection", defNS).setAttribute("type", "DLESE:Unknown")); geo.addContent( new Element("coordinateSystem", defNS).setAttribute("type", "DLESE:Geographic latitude and longitude")); Element bb = new Element("boundBox", defNS); geo.addContent( bb); double west = LatLonPointImpl.lonNormal(gc.getLonWest()); double east = LatLonPointImpl.lonNormal(gc.getLonEast()); bb.addContent( new Element("westCoord", defNS).setText( ucar.unidata.util.Format.dfrac( west, 2))); bb.addContent( new Element("eastCoord", defNS).setText( ucar.unidata.util.Format.dfrac( east, 2))); bb.addContent( new Element("northCoord", defNS).setText( ucar.unidata.util.Format.dfrac( gc.getLatNorth(), 2))); bb.addContent( new Element("southCoord", defNS).setText( ucar.unidata.util.Format.dfrac( gc.getLatSouth(), 2))); bb.addContent( new Element("bbSrcName", defNS).setText( "Calculated from dataset coordinate system by CDM/THREDDS")); return geos; }