private ProjectionCT makeSinusoidalProjection(String name, Attribute projParams) { double radius = projParams.getNumericValue(0).doubleValue(); double centMer = projParams.getNumericValue(4).doubleValue(); double falseEast = projParams.getNumericValue(6).doubleValue(); double falseNorth = projParams.getNumericValue(7).doubleValue(); Sinusoidal proj = new Sinusoidal(centMer, falseEast * .001, falseNorth * .001, radius * .001); return new ProjectionCT(name, "FGDC", proj); }
private ProjectionCT makeSinusoidalProjection(String name, Attribute projParams) { double radius = projParams.getNumericValue(0).doubleValue(); double centMer = projParams.getNumericValue(4).doubleValue(); double falseEast = projParams.getNumericValue(6).doubleValue(); double falseNorth = projParams.getNumericValue(7).doubleValue(); Sinusoidal proj = new Sinusoidal(centMer, falseEast * .001, falseNorth * .001, radius * .001); return new ProjectionCT(name, "FGDC", proj); }
private ProjectionCT makeSinusoidalProjection(String name, Attribute projParams) { double radius = projParams.getNumericValue(0).doubleValue(); double centMer = projParams.getNumericValue(4).doubleValue(); double falseEast = projParams.getNumericValue(6).doubleValue(); double falseNorth = projParams.getNumericValue(7).doubleValue(); Sinusoidal proj = new Sinusoidal(centMer, falseEast * .001, falseNorth * .001, radius * .001); return new ProjectionCT(name, "FGDC", proj); }
private CoordinateTransform makeLambertAzimuthalProjection(NetcdfDataset ds) { double lat0 = findAttributeDouble(ds, "YCENT"); double lon0 = findAttributeDouble(ds, "XCENT"); LambertAzimuthalEqualArea p = new LambertAzimuthalEqualArea(lat0, lon0, 0.0, 0.0, earthRadius); return new ProjectionCT("LambertAzimuthal", "FGDC", p); }
private CoordinateTransform makeLambertAzimuthalProjection(NetcdfDataset ds) { double lat0 = findAttributeDouble(ds, "YCENT"); double lon0 = findAttributeDouble(ds, "XCENT"); LambertAzimuthalEqualArea p = new LambertAzimuthalEqualArea(lat0, lon0, 0.0, 0.0, earthRadius); return new ProjectionCT("LambertAzimuthal", "FGDC", p); }
private CoordinateTransform makeEquitorialMercatorProjection(NetcdfDataset ds) { double lon0 = findAttributeDouble(ds, "XCENT"); double par = findAttributeDouble(ds, "P_ALP"); Mercator p = new Mercator(lon0, par, 0.0, 0.0, earthRadius); return new ProjectionCT("EquitorialMercator", "FGDC", p); }
private CoordinateTransform makeLambertAzimuthalProjection(NetcdfDataset ds) { double lat0 = findAttributeDouble(ds, "YCENT"); double lon0 = findAttributeDouble(ds, "XCENT"); LambertAzimuthalEqualArea p = new LambertAzimuthalEqualArea(lat0, lon0, 0.0, 0.0, earthRadius); return new ProjectionCT("LambertAzimuthal", "FGDC", p); }
public CoordinateTransform makeCoordinateTransform(NetcdfDataset ds, Variable ctv) { double par = readAttributeDouble(ctv, CF.STANDARD_PARALLEL, Double.NaN); readStandardParams(ds, ctv); ucar.unidata.geoloc.ProjectionImpl proj = new CylindricalEqualAreaProjection(lon0, par, false_easting, false_northing, earth); return new ProjectionCT(ctv.getShortName(), "FGDC", proj); } }
public CoordinateTransform makeCoordinateTransform(NetcdfDataset ds, Variable ctv) { double lon0 = readAttributeDouble( ctv, CF.LONGITUDE_OF_PROJECTION_ORIGIN, Double.NaN); double lat0 = readAttributeDouble( ctv, CF.LATITUDE_OF_PROJECTION_ORIGIN, Double.NaN); ucar.unidata.geoloc.projection.Orthographic proj = new ucar.unidata.geoloc.projection.Orthographic(lat0, lon0); return new ProjectionCT(ctv.getShortName(), "FGDC", proj); } }
private CoordinateTransform makePolarStereographicProjection(NetcdfDataset ds) { //boolean n_polar = (findAttributeDouble(ds, "P_ALP") == 1.0); //double central_meridian = findAttributeDouble(ds, "P_GAM"); double lon0 = findAttributeDouble(ds, "XCENT"); double lat0 = findAttributeDouble(ds, "YCENT"); double latts = findAttributeDouble(ds, "P_BET"); Stereographic sg = new Stereographic(latts, lat0, lon0, 0.0, 0.0, earthRadius); //sg.setCentralMeridian(centeral_meridian); return new ProjectionCT("PolarStereographic", "FGDC", sg); }
private CoordinateTransform makePolarStereographicProjection(NetcdfDataset ds) { //boolean n_polar = (findAttributeDouble(ds, "P_ALP") == 1.0); //double central_meridian = findAttributeDouble(ds, "P_GAM"); double lon0 = findAttributeDouble(ds, "XCENT"); double lat0 = findAttributeDouble(ds, "YCENT"); double latts = findAttributeDouble(ds, "P_BET"); Stereographic sg = new Stereographic(latts, lat0, lon0, 0.0, 0.0, earthRadius); //sg.setCentralMeridian(centeral_meridian); return new ProjectionCT("PolarStereographic", "FGDC", sg); }
public CoordinateTransform makeCoordinateTransform(NetcdfDataset ds, Variable ctv) { double lon = readAttributeDouble( ctv, CF.GRID_NORTH_POLE_LONGITUDE, Double.NaN); double lat = readAttributeDouble( ctv, CF.GRID_NORTH_POLE_LATITUDE, Double.NaN); ucar.unidata.geoloc.projection.RotatedPole proj = new ucar.unidata.geoloc.projection.RotatedPole( lat, lon); return new ProjectionCT(ctv.getShortName(), "FGDC", proj); }
public CoordinateTransform makeCoordinateTransform(NetcdfDataset ds, Variable ctv) { double lon0 = readAttributeDouble( ctv, CF.LONGITUDE_OF_PROJECTION_ORIGIN, Double.NaN); double lat0 = readAttributeDouble( ctv, CF.LATITUDE_OF_PROJECTION_ORIGIN, Double.NaN); ucar.unidata.geoloc.projection.Orthographic proj = new ucar.unidata.geoloc.projection.Orthographic(lat0, lon0); return new ProjectionCT(ctv.getShortName(), "FGDC", proj); } }
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); }
public CoordinateTransform makeCoordinateTransform(NetcdfDataset ds, Variable ctv) { double lon = readAttributeDouble( ctv, ucar.unidata.geoloc.projection.RotatedLatLon.GRID_SOUTH_POLE_LONGITUDE, Double.NaN); double lat = readAttributeDouble( ctv, ucar.unidata.geoloc.projection.RotatedLatLon.GRID_SOUTH_POLE_LATITUDE, Double.NaN); double angle = readAttributeDouble( ctv, ucar.unidata.geoloc.projection.RotatedLatLon.GRID_SOUTH_POLE_ANGLE, Double.NaN); ucar.unidata.geoloc.projection.RotatedLatLon proj = new ucar.unidata.geoloc.projection.RotatedLatLon( lat, lon, angle); return new ProjectionCT(ctv.getShortName(), "FGDC", proj); }
private CoordinateTransform makeLCProjection(NetcdfDataset ds) { double par1 = findAttributeDouble(ds, "P_ALP"); double par2 = findAttributeDouble(ds, "P_BET"); double lon0 = findAttributeDouble(ds, "XCENT"); double lat0 = findAttributeDouble(ds, "YCENT"); LambertConformal lc = new LambertConformal(lat0, lon0, par1, par2, 0.0, 0.0, earthRadius); return new ProjectionCT("LambertConformalProjection", "FGDC", lc); }
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); }
public CoordinateTransform makeCoordinateTransform(NetcdfDataset ds, Variable ctv) { double lon0 = readAttributeDouble( ctv, CF.LONGITUDE_OF_PROJECTION_ORIGIN, Double.NaN); double lat0 = readAttributeDouble( ctv, CF.LATITUDE_OF_PROJECTION_ORIGIN, Double.NaN); double rot = readAttributeDouble( ctv, ucar.unidata.geoloc.projection.FlatEarth.ROTATIONANGLE, 0.0); double earth_radius = getEarthRadiusInKm(ctv); ucar.unidata.geoloc.projection.FlatEarth proj = new ucar.unidata.geoloc.projection.FlatEarth(lat0, lon0, rot, earth_radius); return new ProjectionCT(ctv.getShortName(), "FGDC", proj); } }
public ProjectionCT makeCoordinateTransform(AttributeContainer ctv, String geoCoordinateUnits) { double lon0 = readAttributeDouble( ctv, CF.LONGITUDE_OF_PROJECTION_ORIGIN, Double.NaN); double lat0 = readAttributeDouble( ctv, CF.LATITUDE_OF_PROJECTION_ORIGIN, Double.NaN); double rot = readAttributeDouble( ctv, ucar.unidata.geoloc.projection.FlatEarth.ROTATIONANGLE, 0.0); double earth_radius = getEarthRadiusInKm(ctv); ucar.unidata.geoloc.projection.FlatEarth proj = new ucar.unidata.geoloc.projection.FlatEarth(lat0, lon0, rot, earth_radius); return new ProjectionCT(ctv.getName(), "FGDC", proj); } }
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); }