/** * Set latitude extent * @param size latitude extent, decimal degrees north */ public void setLatExtent(double size) { if (northsouth == null) northsouth = new Range(defaultNorthsouth); northsouth.size = size; hashCode = 0; }
public void setBoundingBox(LatLonRect bb) { LatLonPointImpl llpt = bb.getLowerLeftPoint(); LatLonPointImpl urpt = bb.getUpperRightPoint(); double height = urpt.getLatitude() - llpt.getLatitude(); this.eastwest = new Range(llpt.getLongitude(), bb.getWidth(), 0.0, CDM.LON_UNITS); this.northsouth = new Range(llpt.getLatitude(), height, 0.0, CDM.LAT_UNITS); if ((bb.getWidth() > 358) && (height > 178)) setGlobal(true); // LOOK ?? }
/** * Set latitude resolution * @param resolution latitude resolution, decimal degrees north */ public void setLatResolution(double resolution) { if (northsouth == null) northsouth = new Range(defaultNorthsouth); northsouth.resolution = resolution; hashCode = 0; }
public void setVertical(CoordinateAxis1D vaxis) { int n = (int) vaxis.getSize(); double size = vaxis.getCoordValue(n - 1) - vaxis.getCoordValue(0); double resolution = vaxis.getIncrement(); String units = vaxis.getUnitsString(); this.updown = new Range(vaxis.getCoordValue(0), size, resolution, units); if (units != null) { setZPositiveUp(SimpleUnit.isCompatible("m", units)); } }
public void setBoundingBox(LatLonRect bb) { LatLonPointImpl llpt = bb.getLowerLeftPoint(); LatLonPointImpl urpt = bb.getUpperRightPoint(); double height = urpt.getLatitude() - llpt.getLatitude(); this.eastwest = new Range(llpt.getLongitude(), bb.getWidth(), 0.0, CDM.LON_UNITS); this.northsouth = new Range(llpt.getLatitude(), height, 0.0, CDM.LAT_UNITS); if ((bb.getWidth() > 358) && (height > 178)) setGlobal(true); // LOOK ?? }
public void setBoundingBox(LatLonRect bb) { LatLonPointImpl llpt = bb.getLowerLeftPoint(); LatLonPointImpl urpt = bb.getUpperRightPoint(); double height = urpt.getLatitude() - llpt.getLatitude(); this.eastwest = new Range(llpt.getLongitude(), bb.getWidth(), 0.0, CDM.LON_UNITS); this.northsouth = new Range(llpt.getLatitude(), height, 0.0, CDM.LAT_UNITS); if ((bb.getWidth() > 358) && (height > 178)) setGlobal(true); // LOOK ?? }
/** * Set height resolution * @param resolution height resolution */ public void setHeightResolution(double resolution) { if (updown == null) updown = new Range(defaultUpdown); updown.resolution = resolution; hashCode = 0; }
/** * Set starting latitude * @param start starting latitude, decimal degrees north */ public void setLatStart(double start) { if (northsouth == null) northsouth = new Range(defaultNorthsouth); northsouth.start = start; hashCode = 0; }
/** * Set height units * @param units height units */ public void setHeightUnits(String units) { if (updown == null) updown = new Range(defaultUpdown); updown.units = units; hashCode = 0; }
/** * Set starting latitude * @param start starting latitude, decimal degrees north */ public void setLatStart(double start) { if (northsouth == null) northsouth = new Range(defaultNorthsouth); northsouth.start = start; hashCode = 0; }
protected ThreddsMetadata.Range readGeospatialRange(Element spElem, String defUnits) { if (spElem == null) return null; double start = readDouble(spElem.getChild("start", defNS)); double size = readDouble(spElem.getChild("size", defNS)); double resolution = readDouble(spElem.getChild("resolution", defNS)); String units = spElem.getChildText("units", defNS); if (units == null) units = defUnits; return new ThreddsMetadata.Range(start, size, resolution, units); }
public void setVertical(double start, double end, double resolution, String units, boolean isPositiveUp) { double size = end - start; this.updown = new Range(start, size, resolution, units); setZPositiveUp(isPositiveUp); }
/** * Set height resolution * @param resolution height resolution */ public void setHeightResolution(double resolution) { if (updown == null) updown = new Range(defaultUpdown); updown.resolution = resolution; hashCode = 0; }
public void setVertical(double start, double end, double resolution, String units, boolean isPositiveUp) { double size = end - start; this.updown = new Range(start, size, resolution, units); setZPositiveUp(isPositiveUp); }
/** * Set height extent * @param size height extent */ public void setHeightExtent(double size) { if (updown == null) updown = new Range(defaultUpdown); updown.size = size; hashCode = 0; }
/** * Set latitude units * @param units set units */ public void setLatUnits(String units) { if (northsouth == null) northsouth = new Range(defaultNorthsouth); northsouth.units = units; hashCode = 0; }
public void setVertical(CoordinateAxis1D vaxis) { int n = (int) vaxis.getSize(); double size = vaxis.getCoordValue(n - 1) - vaxis.getCoordValue(0); double resolution = vaxis.getIncrement(); String units = vaxis.getUnitsString(); this.updown = new Range(vaxis.getCoordValue(0), size, resolution, units); if (units != null) { setZPositiveUp(SimpleUnit.isCompatible("m", units)); } }
/** * Set longitude units * @param units longitude units */ public void setLonUnits(String units) { if (eastwest == null) eastwest = new Range(defaultEastwest); eastwest.units = units; hashCode = 0; }
/** * Set longitude resolution * @param resolution longitude resolution */ public void setLonResolution(double resolution) { if (eastwest == null) eastwest = new Range(defaultEastwest); eastwest.resolution = resolution; hashCode = 0; }
/** * Set height extent * @param size height extent */ public void setHeightExtent(double size) { if (updown == null) updown = new Range(defaultUpdown); updown.size = size; hashCode = 0; }