/** * Get maximum longitude, aka "east" edge * * @return maximum longitude */ public double getLonMax() { return lowerLeft.getLongitude() + width; }
/** * Get minimum longitude, aka "west" edge * * @return minimum longitude */ public double getLonMin() { return lowerLeft.getLongitude(); }
/** * Get the origin longitude. * @return the origin longitude. */ public double getOriginLon() { return origin.getLongitude(); }
/** * Get the origin longitude. * * @return the origin longitude. */ public double getOriginLon() { return origin.getLongitude(); }
/** * Get the tangent longitude * * @return the tangent longitude */ public double getTangentLon() { return origin.getLongitude(); }
/** * Get the origin longitude. * @return the origin longitude. */ public double getOriginLon() { return origin.getLongitude(); }
/** * Get minimum longitude, aka "west" edge * * @return minimum longitude */ public double getLonMin() { return lowerLeft.getLongitude(); }
/** * Get maximum longitude, aka "east" edge * * @return maximum longitude */ public double getLonMax() { return lowerLeft.getLongitude() + width; }
/** * Get the origin longitude. * * @return the origin longitude. */ public double getOriginLon() { return origin.getLongitude(); }
/** * Get the upper left corner of the bounding box. * * @return upper left corner of the bounding box */ public LatLonPointImpl getUpperLeftPoint() { return new LatLonPointImpl(upperRight.getLatitude(), lowerLeft.getLongitude()); }
/** * Get the lower left corner of the bounding box. * * @return lower left corner of the bounding box */ public LatLonPointImpl getLowerRightPoint() { return new LatLonPointImpl(lowerLeft.getLatitude(), upperRight.getLongitude()); }
/** * Get the upper left corner of the bounding box. * * @return upper left corner of the bounding box */ public LatLonPointImpl getUpperLeftPoint() { return new LatLonPointImpl(upperRight.getLatitude(), lowerLeft.getLongitude()); }
public static void main(String arg[]) { UtmProjection utm = new UtmProjection(17, true); LatLonPointImpl ll = utm.projToLatLon(577.8000000000001, 2951.8); System.out.printf("%15.12f %15.12f%n",ll.getLatitude(), ll.getLongitude()); assert closeEnough(ll.getLongitude(), -80.21802662821469, 1.0e-8); assert closeEnough(ll.getLatitude(), 26.685132668190793, 1.0e-8); }
public static void main(String arg[]) { UtmProjection utm = new UtmProjection(17, true); LatLonPointImpl ll = utm.projToLatLon(577.8000000000001, 2951.8); System.out.printf("%15.12f %15.12f%n", ll.getLatitude(), ll.getLongitude()); assert Misc.closeEnough(ll.getLongitude(), -80.21802662821469, 1.0e-8); assert Misc.closeEnough(ll.getLatitude(), 26.685132668190793, 1.0e-8); }
@Override protected StationHelper createStationHelper() throws IOException { StationHelper helper = new StationHelper(); String name = String.format("GridPointAt[%s]", latLonPoint.toString(3)); name = StringUtil2.replace(name.trim(), ' ', "_"); helper.addStation(new MyStationFeature(name, name, null, latLonPoint.getLatitude(), latLonPoint.getLongitude(), 0.0, dateUnit, null, -1)); return helper; }
private String makeBB( LatLonRect bb) { return latVar.getFullName()+">="+bb.getLowerLeftPoint().getLatitude()+"&"+ latVar.getFullName()+"<="+bb.getUpperRightPoint().getLatitude()+"&"+ lonVar.getFullName()+">="+bb.getLowerLeftPoint().getLongitude()+"&"+ lonVar.getFullName()+"<="+bb.getUpperRightPoint().getLongitude(); }
private String makeBB( LatLonRect bb) { return latVar.getShortName()+">="+bb.getLowerLeftPoint().getLatitude()+"&"+ latVar.getShortName()+"<="+bb.getUpperRightPoint().getLatitude()+"&"+ lonVar.getShortName()+">="+bb.getLowerLeftPoint().getLongitude()+"&"+ lonVar.getShortName()+"<="+bb.getUpperRightPoint().getLongitude(); }
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 ?? }
public void finish() throws IOException { writer.updateAttribute(null, new Attribute(CDM.LAT_MIN, llbb.getLowerLeftPoint().getLatitude())); writer.updateAttribute(null, new Attribute(CDM.LAT_MAX, llbb.getUpperRightPoint().getLatitude())); writer.updateAttribute(null, new Attribute(CDM.LON_MIN, llbb.getLowerLeftPoint().getLongitude())); writer.updateAttribute(null, new Attribute(CDM.LON_MAX, llbb.getUpperRightPoint().getLongitude())); if((writer.getNetcdfFile().findAttribute("@"+CDM.TIME_START) != null) && (writer.getNetcdfFile().findAttribute("@"+CDM.TIME_END) != null )){ if (minDate == null) minDate = CalendarDate.present(); if (maxDate == null) maxDate = CalendarDate.present(); writer.updateAttribute(null, new Attribute(CDM.TIME_START, CalendarDateFormatter.toDateTimeStringISO(minDate))); writer.updateAttribute(null, new Attribute(CDM.TIME_END, CalendarDateFormatter.toDateTimeStringISO(maxDate))); } writer.close(); }