@Override protected LatLonProjection createProjection(final ParameterValueGroup p) { return new LatLonProjection(); } }
/** * Create a new LatLonProjection * * @param name name of projection * @param defaultMapArea bounding box */ public LatLonProjection(String name, ProjectionRect defaultMapArea) { super(name, true); this.defaultMapArea = defaultMapArea; addParameter(CF.GRID_MAPPING_NAME, CF.LATITUDE_LONGITUDE); }
/** * copy constructor - avoid clone !! */ public ProjectionImpl constructCopy() { return new LatLonProjection(getName(), getDefaultMapArea()); }
@Override public ProjectionImpl constructCopy() { LatLonProjection result = new LatLonProjection(getName(), getDefaultMapArea()); result.setDefaultMapArea(defaultMapArea); result.setName(name); result.earth = this.earth; return result; }
LatLonProjection llproj = new LatLonProjection(); ucar.unidata.geoloc.ProjectionRect[] prect = llproj.latLonToProjRect(bbox); logger.debug("constrain bbox = {}", prect[0]);
if (isLatLon) { LatLonProjection llp = (LatLonProjection) this; llp.setCenterLon(latlonRect.getCenterLon()); // LOOK side effect BAD !!
LatLonProjection llproj = new LatLonProjection(); ucar.unidata.geoloc.ProjectionRect[] prect = llproj.latLonToProjRect(bbox); logger.debug("constrain bbox = {}", prect[0]);
if (isLatLon) { LatLonProjection llp = (LatLonProjection) this; llp.setCenterLon(latlonRect.getCenterLon()); // LOOK side effect BAD !!
public void setUp() { p = new LatLonProjection(); }
@Override public ProjectionImpl constructCopy() { ProjectionImpl result = new LatLonProjection(getName(), getDefaultMapArea()); result.setDefaultMapArea(defaultMapArea); result.setName(name); return result; }
/** * Create a new LatLonProjection * * @param name name of projection * @param defaultMapArea bounding box */ public LatLonProjection(String name, ProjectionRect defaultMapArea) { super(name, true); this.defaultMapArea = defaultMapArea; addParameter(CF.GRID_MAPPING_NAME, CF.LATITUDE_LONGITUDE); }
if (isLatLon) { LatLonProjection llp = (LatLonProjection) this; llp.setCenterLon(latlonRect.getCenterLon()); // LOOK side effect BAD !!
/** 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; }
/** * Create a new LatLonProjection * * @param name name of projection * @param defaultMapArea bounding box */ public LatLonProjection(String name, ProjectionRect defaultMapArea) { addParameter(ATTR_NAME, "latitude_longitude"); this.name = name; isLatLon = true; this.defaultMapArea = defaultMapArea; }
if (isLatLon) { LatLonProjection llp = (LatLonProjection) this; llp.setCenterLon(latlonRect.getCenterLon()); // LOOK side effect BAD !!
/** 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;
private void addParameters() { addParameter(CF.GRID_MAPPING_NAME, CF.LATITUDE_LONGITUDE); if (earth.isSpherical()) addParameter(CF.EARTH_RADIUS, earth.getEquatorRadius()); else { addParameter(CF.SEMI_MAJOR_AXIS, earth.getEquatorRadius()); addParameter(CF.SEMI_MINOR_AXIS, earth.getPoleRadius()); } }
/** 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;
public ProjectionImpl getProjection() { for (String ctName : getTransformNames()) { CoverageTransform ct = dataset.findCoordTransform(ctName); if (ct != null && ct.isHoriz()) return ct.getProjection(); } return new LatLonProjection(); }