/** * Test * * @param args not used */ public static void main(String[] args) { AlbersEqualArea a = new AlbersEqualArea(23, -96, 29.5, 45.5); System.out.printf("name=%s%n", a.getName()); System.out.println("ll = 35N 75W"); ProjectionPointImpl p = a.latLonToProj(35, -75); System.out.println("proj point = " + p); LatLonPoint ll = a.projToLatLon(p); System.out.println("ll = " + ll); }
/** * Test * * @param args not used */ public static void main(String[] args) { AlbersEqualArea a = new AlbersEqualArea(23, -96, 29.5, 45.5); System.out.printf("name=%s%n", a.getName()); System.out.println("ll = 35N 75W"); ProjectionPoint p = a.latLonToProj(35, -75); System.out.println("proj point = " + p); LatLonPoint ll = a.projToLatLon(p); System.out.println("ll = " + ll); }
/** * Test * * @param args not used */ public static void main(String[] args) { AlbersEqualArea a = new AlbersEqualArea(23, -96, 29.5, 45.5); System.out.printf("name=%s%n", a.getName()); System.out.println("ll = 35N 75W"); ProjectionPoint p = a.latLonToProj(35, -75); System.out.println("proj point = " + p); LatLonPoint ll = a.projToLatLon(p); System.out.println("ll = " + ll); }
/** * Test * * @param args not used */ public static void main(String[] args) { AlbersEqualArea a = new AlbersEqualArea(23, -96, 29.5, 45.5); System.out.printf("name=%s%n", a.getName()); System.out.println("ll = 35N 75W"); ProjectionPointImpl p = a.latLonToProj(35, -75); System.out.println("proj point = " + p); LatLonPoint ll = a.projToLatLon(p); System.out.println("ll = " + ll); }
@Override protected AlbersEqualArea createProjection(final ParameterValueGroup p) { if (p == null) return new AlbersEqualArea(); return new AlbersEqualArea(value(p, CF.LATITUDE_OF_PROJECTION_ORIGIN), value(p, CF.LONGITUDE_OF_CENTRAL_MERIDIAN), value(p, CF.STANDARD_PARALLEL + "[1]"), value(p, CF.STANDARD_PARALLEL + "[2]"), value(p, CF.FALSE_EASTING) / KILOMETRE, value(p, CF.FALSE_NORTHING) / KILOMETRE, earthRadius(p) / KILOMETRE); } }
private CoordinateTransform makeAlbersProjection(NetcdfDataset ds) { double lat0 = findAttributeDouble(ds, "YCENT"); double lon0 = findAttributeDouble(ds, "XCENT"); double par1 = findAttributeDouble(ds, "P_ALP"); double par2 = findAttributeDouble(ds, "P_BET"); AlbersEqualArea p = new AlbersEqualArea(lat0, lon0, par1, par2, 0.0, 0.0, earthRadius); return new ProjectionCT("Albers", "FGDC", p); }
private CoordinateTransform makeAlbersProjection(NetcdfDataset ds) { double lat0 = findAttributeDouble(ds, "YCENT"); double lon0 = findAttributeDouble(ds, "XCENT"); double par1 = findAttributeDouble(ds, "P_ALP"); double par2 = findAttributeDouble(ds, "P_BET"); AlbersEqualArea p = new AlbersEqualArea(lat0, lon0, par1, par2, 0.0, 0.0, earthRadius); return new ProjectionCT("Albers", "FGDC", p); }
private CoordinateTransform makeAlbersProjection(NetcdfDataset ds) { double lat0 = findAttributeDouble(ds, "YCENT"); double lon0 = findAttributeDouble(ds, "XCENT"); double par1 = findAttributeDouble(ds, "P_ALP"); double par2 = findAttributeDouble(ds, "P_BET"); AlbersEqualArea p = new AlbersEqualArea(lat0, lon0, par1, par2, 0.0, 0.0, earthRadius); return new ProjectionCT("Albers", "FGDC", p); }
@Test public void testAEA() { testProjection(new AlbersEqualArea()); AlbersEqualArea p = new AlbersEqualArea(); AlbersEqualArea p2 = (AlbersEqualArea) p.constructCopy(); assert p.equals(p2); }
public ProjectionCT makeCoordinateTransform(AttributeContainer ctv, String geoCoordinateUnits) { double[] pars = readAttributeDouble2(ctv.findAttribute(CF.STANDARD_PARALLEL)); if (pars == null) return null; readStandardParams(ctv, geoCoordinateUnits); ucar.unidata.geoloc.ProjectionImpl proj; if (earth != null) { proj = new AlbersEqualAreaEllipse(lat0, lon0, pars[0], pars[1], false_easting, false_northing, earth); } else { proj = new ucar.unidata.geoloc.projection.AlbersEqualArea(lat0, lon0, pars[0], pars[1], false_easting, false_northing, earth_radius); } return new ProjectionCT(ctv.getName(), "FGDC", proj); } }
public CoordinateTransform makeCoordinateTransform(NetcdfDataset ds, Variable ctv) { double[] pars = readAttributeDouble2(ctv.findAttribute(CF.STANDARD_PARALLEL)); if (pars == null) return null; readStandardParams(ds, ctv); ucar.unidata.geoloc.ProjectionImpl proj; if (earth != null) { proj = new AlbersEqualAreaEllipse(lat0, lon0, pars[0], pars[1], false_easting, false_northing, earth); } else { proj = new ucar.unidata.geoloc.projection.AlbersEqualArea(lat0, lon0, pars[0], pars[1], false_easting, false_northing, earth_radius); } return new ProjectionCT(ctv.getShortName(), "FGDC", proj); } }
public CoordinateTransform makeCoordinateTransform(NetcdfDataset ds, Variable ctv) { double[] pars = readAttributeDouble2(ctv.findAttribute(CF.STANDARD_PARALLEL)); if (pars == null) return null; readStandardParams(ds, ctv); ucar.unidata.geoloc.ProjectionImpl proj; if (earth != null) { proj = new AlbersEqualAreaEllipse(lat0, lon0, pars[0], pars[1], false_easting, false_northing, earth); } else { proj = new ucar.unidata.geoloc.projection.AlbersEqualArea(lat0, lon0, pars[0], pars[1], false_easting, false_northing, earth_radius); } return new ProjectionCT(ctv.getShortName(), "FGDC", proj); } }
/** * copy constructor - avoid clone !! */ public ProjectionImpl constructCopy() { return new AlbersEqualArea(getOriginLat(), getOriginLon(), getParallelOne(), getParallelTwo(), getFalseEasting(), getFalseNorthing(), getEarthRadius()); }
/** * copy constructor - avoid clone !! */ public ProjectionImpl constructCopy() { ProjectionImpl result = new AlbersEqualArea(getOriginLat(), getOriginLon(), getParallelOne(), getParallelTwo(), getFalseEasting(), getFalseNorthing(), getEarthRadius()); result.setDefaultMapArea(defaultMapArea); result.setName(name); return result; }
/** * copy constructor - avoid clone !! */ public ProjectionImpl constructCopy() { ProjectionImpl result = new AlbersEqualArea(getOriginLat(), getOriginLon(), getParallelOne(), getParallelTwo(), getFalseEasting(), getFalseNorthing(), getEarthRadius()); result.setDefaultMapArea(defaultMapArea); result.setName(name); return result; }
/** * copy constructor - avoid clone !! */ public ProjectionImpl constructCopy() { ProjectionImpl result = new AlbersEqualArea(getOriginLat(), getOriginLon(), getParallelOne(), getParallelTwo(), getFalseEasting(), getFalseNorthing(), getEarthRadius()); result.setDefaultMapArea(defaultMapArea); result.setName(name); return result; }
public GdsHorizCoordSys makeHorizCoordSys() { ProjectionImpl proj; Earth earth = getEarth(); if (earth.isSpherical()) { proj = new ucar.unidata.geoloc.projection.AlbersEqualArea(latin1, lov, latin1, latin2, 0.0, 0.0, earth.getEquatorRadius() * .001); } else { proj = new ucar.unidata.geoloc.projection.proj4.AlbersEqualAreaEllipse( latin1, lov, latin1, latin2, 0.0, 0.0, earth); } LatLonPointImpl startLL = new LatLonPointImpl(la1, lo1); ProjectionPointImpl start = (ProjectionPointImpl) proj.latLonToProj(startLL); return new GdsHorizCoordSys(getNameShort(), template, getOctet4(7), scanMode, proj, start.getX(), dX, start.getY(), dY, getNxRaw(), getNyRaw(), getNptsInLine()); }
return new AlbersEqualArea(lat0, lon0, par1, par2, falseEasting, falseNorthing);
return new AlbersEqualArea(lat0, lon0, par1, par2, falseEasting, falseNorthing);
break; case ALBGRD3: p = new AlbersEqualArea( ycent, xcent, p_alp, p_bet ); break; case LEQGRD3: