/** * Get the Upper Left Point * * @return the Upper Left Point */ public ProjectionPoint getUpperLeftPoint() { return new ProjectionPointImpl(getMinPoint().getX(), getMaxPoint().getY()); }
/** * Convert a LatLonPoint to projection coordinates * * @param latlon convert from these lat, lon coordinates * @param result the object to write to * @return the given result */ public ProjectionPoint latLonToProj(LatLonPoint latlon, ProjectionPointImpl result) { result.setLocation(LatLonPointImpl.lonNormal(latlon.getLongitude(), centerLon), latlon.getLatitude()); return result; }
public LatLonRect projToLatLonBB(ProjectionRect world) { double startLat = world.getMinY(); double startLon = world.getMinX(); double deltaLat = world.getHeight(); double deltaLon = world.getWidth(); LatLonPoint llpt = new LatLonPointImpl(startLat, startLon); return new LatLonRect(llpt, deltaLat, deltaLon); }
public StationImpl( Station s, int nobs) { super(s.getLatitude(), s.getLongitude(), s.getAltitude()); setName(s.getName()); setDescription(s.getDescription()); setWmoId(s.getWmoId()); setNobs( nobs); }
void doTests(ProjectionImpl p, double mid) { LatLonPointImpl ptL = new LatLonPointImpl(-10, 0.0); double xinc = 22.5; double yinc = 20.0; for (double lon = mid - 90; lon < mid + 90; lon += xinc) { ptL.setLongitude(lon); LatLonRect llbb = new LatLonRect(ptL, yinc, xinc); ProjectionPoint pt1 = p.latLonToProj(ptL); ProjectionPoint pt2 = p.latLonToProj(llbb.getLowerRightPoint()); if (!p.crossSeam(pt1, pt2)) doTest(p, llbb); } }
/** * Copy Constructor * * @param r rectangle to copy */ public LatLonRect(LatLonRect r) { this(r.getLowerLeftPoint(), r.getUpperRightPoint().getLatitude() - r.getLowerLeftPoint().getLatitude(), r.getWidth()); }
/** * Construct a ProjectionRect from any two opposite corner points. * * @param minimum lower left corner, ie the minimum x and y * @param width x width. * @param height y height */ public ProjectionRect(ProjectionPoint minimum, double width, double height) { setRect(minimum.getX(), minimum.getY(), width, height); }
public LatLonPoint getLatLon() { if (llpt == null) llpt = new LatLonPointImpl(location.getLatitude(), location.getLongitude()); return llpt; }
/** * Convert a LatLonPoint to projection coordinates * Note: a new object is now created on each call for the return value, as of 4.0.46 * * @param lat latitude of point to convert * @param lon longitude of point to convert * @return ProjectionPointImpl convert to these projection coordinates */ public ProjectionPoint latLonToProj(double lat, double lon) { return latLonToProj(new LatLonPointImpl(lat, lon)); }
/** * Convert projection coordinates to a LatLonPoint * Note: a new object is now created on each call for the return value, as of 4.0.46 * * @param ppt convert from these projection coordinates * @return LatLonPoint convert to these lat/lon coordinates */ public LatLonPoint projToLatLon(ProjectionPoint ppt) { return projToLatLon(ppt, new LatLonPointImpl()); }
/** * Convert a LatLonPoint to projection coordinates * Note: a new object is now created on each call for the return value, as of 4.0.46 * * @param latLon convert from these lat, lon coordinates * @return ProjectionPoint convert to these projection coordinates */ public ProjectionPoint latLonToProj(LatLonPoint latLon) { return latLonToProj(latLon, new ProjectionPointImpl()); }
"Unexpected latitude of origin: " + latOrigin); double lonNorthPole = LatLonPointImpl.lonNormal(lonOrigin + 180); double latNorthPole = 90 - latOrigin; ParameterValueGroup netcdfParameters = ogcParameters.clone();
/** * Get the Lower Right Point * * @return the Lower Right Point */ public ProjectionPoint getLowerRightPoint() { return new ProjectionPointImpl(getMaxPoint().getX(), getMinPoint().getY()); }
/** * Convert a LatLonPoint to projection coordinates * * @param latlon convert from these lat, lon coordinates * @param result the object to write to * @return the given result */ public ProjectionPoint latLonToProj(LatLonPoint latlon, ProjectionPointImpl result) { result.setLocation(LatLonPointImpl.lonNormal(latlon.getLongitude(), centerLon), latlon.getLatitude()); return result; }
@Override public ParameterValueGroup getOgcParameters( ParameterValueGroup netcdfParameters) { double lonNorthPole = (Double) netcdfParameters .parameter(NetCDFUtilities.CENTRAL_MERIDIAN) .getValue(); double latNorthPole = (Double) netcdfParameters .parameter(NetCDFUtilities.LATITUDE_OF_ORIGIN) .getValue(); // Rotated pole is ambiguous so we assume an origin in the northern // hemisphere if (latNorthPole >= 90 || latNorthPole <= 0) { throw new RuntimeException( "Unexpected north pole latitude: " + latNorthPole); } double lonOrigin = LatLonPointImpl.lonNormal(lonNorthPole + 180); double latOrigin = 90 - latNorthPole; ParameterValueGroup ogcParameters = netcdfParameters.clone(); ogcParameters .parameter(NetCDFUtilities.CENTRAL_MERIDIAN) .setValue(lonOrigin); ogcParameters .parameter(NetCDFUtilities.LATITUDE_OF_ORIGIN) .setValue(latOrigin); return ogcParameters; }
/** * Get the Upper Left Point * * @return the Upper Left Point */ public ProjectionPoint getUpperLeftPoint() { return new ProjectionPointImpl(getMinPoint().getX(), getMaxPoint().getY()); }
/** * Get the Lower Right Point * * @return the Lower Right Point */ public ProjectionPoint getLowerRightPoint() { return new ProjectionPointImpl(getMaxPoint().getX(), getMinPoint().getY()); }
/** * Get the Lower Right Point * * @return the Lower Right Point */ public ProjectionPoint getLowerRightPoint() { return new ProjectionPointImpl(getMaxPoint().getX(), getMinPoint().getY()); }
/** * Get the Upper Left Point * * @return the Upper Left Point */ public ProjectionPoint getUpperLeftPoint() { return new ProjectionPointImpl(getMinPoint().getX(), getMaxPoint().getY()); }
/** * Get the Upper Left Point * * @return the Upper Left Point */ public ProjectionPoint getUpperLeftPoint() { return new ProjectionPointImpl(getMinPoint().getX(), getMaxPoint().getY()); }