@Override protected LatLonProjection createProjection(final ParameterValueGroup p) { return new LatLonProjection(); } }
public void setUp() { p = new LatLonProjection(); }
/** * copy constructor - avoid clone !! */ public ProjectionImpl constructCopy() { return new LatLonProjection(getName(), getDefaultMapArea()); }
/** Get the Projection for this coordinate system. * If isLatLon(), then returns a LatLonProjection. Otherwise, extracts the * projection from any ProjectionCT CoordinateTransform. * @return ProjectionImpl or null if none. */ public ProjectionImpl getProjection() { if (projection == null) { if (isLatLon()) projection = new LatLonProjection(); ProjectionCT projCT = getProjectionCT(); if (null != projCT) projection = projCT.getProjection(); } return projection; } private ProjectionImpl projection = null;
/** Get the Projection for this coordinate system. * If isLatLon(), then returns a LatLonProjection. Otherwise, extracts the * projection from any ProjectionCT CoordinateTransform. * @return ProjectionImpl or null if none. */ public ProjectionImpl getProjection() { if (projection == null) { if (isLatLon()) projection = new LatLonProjection(); ProjectionCT projCT = getProjectionCT(); if (null != projCT) projection = projCT.getProjection(); } return projection; } private ProjectionImpl projection = null;
/** Get the Projection for this coordinate system. * If isLatLon(), then returns a LatLonProjection. Otherwise, extracts the * projection from any ProjectionCT CoordinateTransform. * @return ProjectionImpl or null if none. */ public ProjectionImpl getProjection() { if (projection == null) { if (isLatLon()) projection = new LatLonProjection(); ProjectionCT projCT = getProjectionCT(); if (null != projCT) projection = projCT.getProjection(); } return projection; } private ProjectionImpl projection = null;
@Override public ProjectionImpl constructCopy() { ProjectionImpl result = new LatLonProjection(getName(), getDefaultMapArea()); result.setDefaultMapArea(defaultMapArea); result.setName(name); return result; }
@Override public ProjectionImpl constructCopy() { ProjectionImpl result = new LatLonProjection(getName(), getDefaultMapArea()); result.setDefaultMapArea(defaultMapArea); result.setName(name); return result; }
public ProjectionImpl getProjection() { for (String ctName : getTransformNames()) { CoverageTransform ct = dataset.findCoordTransform(ctName); if (ct != null && ct.isHoriz()) return ct.getProjection(); } return new LatLonProjection(); }
@Override public ProjectionImpl constructCopy() { LatLonProjection result = new LatLonProjection(getName(), getDefaultMapArea()); result.setDefaultMapArea(defaultMapArea); result.setName(name); result.earth = this.earth; return result; }
@Override public ProjectionCT makeCoordinateTransform(AttributeContainer ctv, String geoCoordinateUnits) { readStandardParams(ctv, geoCoordinateUnits); // create spherical Earth obj if not created by readStandardParams w radii, flattening if (earth == null) { if (earth_radius > 0) { // Earth radius obtained in readStandardParams is in km, but Earth object wants m earth = new Earth(earth_radius * 1000); } else { earth = new Earth(); } } LatLonProjection proj = new LatLonProjection(earth); return new ProjectionCT(ctv.getName(), "FGDC", proj); } }
public GdsHorizCoordSys makeHorizCoordSys() { LatLonProjection proj = new LatLonProjection(); return new GdsHorizCoordSys(getNameShort(), template, getOctet4(7), scanMode, proj, 0, 1, 0, 1, getNxRaw(), getNyRaw(), getNptsInLine()); }
GdsHorizCoordSys coordSys = new GdsHorizCoordSys(getNameShort(), template, getOctet4(7), scanMode, new LatLonProjection(), lo1, deltaLon, 0, 0, getNxRaw(), getNyRaw(), getNptsInLine()); coordSys.setGaussianLats(Nparellels, la1, la2);
@Override public GdsHorizCoordSys makeHorizCoordSys() { LatLonProjection proj = new LatLonProjection(getEarth()); //ProjectionPoint startP = proj.latLonToProj(new LatLonPointImpl(la1, lo1)); double startx = lo1; // startP.getX(); double starty = la1; // startP.getY(); return new GdsHorizCoordSys(getNameShort(), template, 0, scanMode, proj, startx, getDx(), starty, getDy(), getNx(), getNy(), null); }
public GdsHorizCoordSys makeHorizCoordSys() { LatLonProjection proj = new LatLonProjection(getEarth()); //ProjectionPoint startP = proj.latLonToProj(new LatLonPointImpl(la1, lo1)); double startx = lo1; // startP.getX(); double starty = la1; // startP.getY(); return new GdsHorizCoordSys(getNameShort(), template, getOctet4(7), scanMode, proj, startx, deltaLon, starty, deltaLat, getNxRaw(), getNyRaw(), getNptsInLine()); }
private CoordinateTransform makeLatLongProjection(NetcdfDataset ds) { //double lat0 = findAttributeDouble(ds, "YCENT"); // Get lower left and upper right corners of domain in lat/lon double x1 = findAttributeDouble(ds, "XORIG"); double y1 = findAttributeDouble(ds, "YORIG"); double x2 = x1 + findAttributeDouble(ds, "XCELL") * findAttributeDouble(ds, "NCOLS"); double y2 = y1 + findAttributeDouble(ds, "YCELL") * findAttributeDouble(ds, "NROWS"); LatLonProjection ll = new LatLonProjection("LatitudeLongitudeProjection", new ProjectionRect(x1, y1, x2, y2)); return new ProjectionCT("LatitudeLongitudeProjection", "FGDC", ll); }
private CoordinateTransform makeLatLongProjection(NetcdfDataset ds) { //double lat0 = findAttributeDouble(ds, "YCENT"); // Get lower left and upper right corners of domain in lat/lon double x1 = findAttributeDouble(ds, "XORIG"); double y1 = findAttributeDouble(ds, "YORIG"); double x2 = x1 + findAttributeDouble(ds, "XCELL") * findAttributeDouble(ds, "NCOLS"); double y2 = y1 + findAttributeDouble(ds, "YCELL") * findAttributeDouble(ds, "NROWS"); LatLonProjection ll = new LatLonProjection("LatitudeLongitudeProjection", new ProjectionRect(x1, y1, x2, y2)); return new ProjectionCT("LatitudeLongitudeProjection", "FGDC", ll); }
private CoordinateTransform makeLatLongProjection(NetcdfDataset ds) { //double lat0 = findAttributeDouble(ds, "YCENT"); // Get lower left and upper right corners of domain in lat/lon double x1 = findAttributeDouble(ds, "XORIG"); double y1 = findAttributeDouble(ds, "YORIG"); double x2 = x1 + findAttributeDouble(ds, "XCELL") * findAttributeDouble(ds, "NCOLS"); double y2 = y1 + findAttributeDouble(ds, "YCELL") * findAttributeDouble(ds, "NROWS"); LatLonProjection ll = new LatLonProjection("LatitudeLongitudeProjection", new ProjectionRect(x1, y1, x2, y2)); return new ProjectionCT("LatitudeLongitudeProjection", "FGDC", ll); }
LatLonProjection llproj = new LatLonProjection(); ucar.unidata.geoloc.ProjectionRect[] prect = llproj.latLonToProjRect(bbox); logger.debug("constrain bbox = {}", prect[0]);
LatLonProjection llproj = new LatLonProjection(); ucar.unidata.geoloc.ProjectionRect[] prect = llproj.latLonToProjRect(bbox); logger.debug("constrain bbox = {}", prect[0]);