/** * Construct a TransverseMercator Projection. * * @param lat0 origin of projection coord system is at (lat0, tangentLon) * @param tangentLon longitude that the cylinder is tangent at ("central meridian") * @param scale scale factor along the central meridian * @param east false easting in units of km * @param north false northing in units of km * @param radius earth radius in km */ public TransverseMercator(double lat0, double tangentLon, double scale, double east, double north, double radius) { super("TransverseMercator", false); this.lat0 = Math.toRadians(lat0); this.lon0 = Math.toRadians(tangentLon); this.earthRadius = radius; this.scale = scale * earthRadius; this.falseEasting = (!Double.isNaN(east)) ? east : 0.0; this.falseNorthing = (!Double.isNaN(north)) ? north : 0.0; addParameter(CF.GRID_MAPPING_NAME, CF.TRANSVERSE_MERCATOR); addParameter(CF.LONGITUDE_OF_CENTRAL_MERIDIAN, tangentLon); addParameter(CF.LATITUDE_OF_PROJECTION_ORIGIN, lat0); addParameter(CF.SCALE_FACTOR_AT_CENTRAL_MERIDIAN, scale); addParameter(CF.EARTH_RADIUS, earthRadius * 1000); if ((falseEasting != 0.0) || (falseNorthing != 0.0)) { addParameter(CF.FALSE_EASTING, falseEasting); addParameter(CF.FALSE_NORTHING, falseNorthing); addParameter(CDM.UNITS, "km"); } }
/** * Construct a TransverseMercator Projection. * * @param lat0 origin of projection coord system is at (lat0, tangentLon) * @param tangentLon longitude that the cylinder is tangent at ("central meridian") * @param scale scale factor along the central meridian * @param east false easting in units of km * @param north false northing in units of km * @param radius earth radius in km */ public TransverseMercator(double lat0, double tangentLon, double scale, double east, double north, double radius) { super("TransverseMercator", false); this.lat0 = Math.toRadians(lat0); this.lon0 = Math.toRadians(tangentLon); this.earthRadius = radius; this.scale = scale * earthRadius; this.falseEasting = (!Double.isNaN(east)) ? east : 0.0; this.falseNorthing = (!Double.isNaN(north)) ? north : 0.0; addParameter(CF.GRID_MAPPING_NAME, CF.TRANSVERSE_MERCATOR); addParameter(CF.LONGITUDE_OF_CENTRAL_MERIDIAN, tangentLon); addParameter(CF.LATITUDE_OF_PROJECTION_ORIGIN, lat0); addParameter(CF.SCALE_FACTOR_AT_CENTRAL_MERIDIAN, scale); addParameter(CF.EARTH_RADIUS, earthRadius * 1000); if ((falseEasting != 0.0) || (falseNorthing != 0.0)) { addParameter(CF.FALSE_EASTING, falseEasting); addParameter(CF.FALSE_NORTHING, falseNorthing); addParameter(CDM.UNITS, "km"); } }
/** * Construct a TransverseMercator Projection. * * @param lat0 origin of projection coord system is at (lat0, tangentLon) * @param tangentLon longitude that the cylinder is tangent at ("central meridian") * @param scale scale factor along the central meridian * @param east false easting in units of km * @param north false northing in units of km * @param radius earth radius in km */ public TransverseMercator(double lat0, double tangentLon, double scale, double east, double north, double radius) { super("TransverseMercator", false); this.lat0 = Math.toRadians(lat0); this.lon0 = Math.toRadians(tangentLon); this.earthRadius = radius; this.scale = scale * earthRadius; this.falseEasting = (!Double.isNaN(east)) ? east : 0.0; this.falseNorthing = (!Double.isNaN(north)) ? north : 0.0; addParameter(CF.GRID_MAPPING_NAME, CF.TRANSVERSE_MERCATOR); addParameter(CF.LONGITUDE_OF_CENTRAL_MERIDIAN, tangentLon); addParameter(CF.LATITUDE_OF_PROJECTION_ORIGIN, lat0); addParameter(CF.SCALE_FACTOR_AT_CENTRAL_MERIDIAN, scale); addParameter(CF.EARTH_RADIUS, earthRadius * 1000); if ((falseEasting != 0.0) || (falseNorthing != 0.0)) { addParameter(CF.FALSE_EASTING, falseEasting); addParameter(CF.FALSE_NORTHING, falseNorthing); addParameter(CDM.UNITS, "km"); } }
/** * Construct a TransverseMercator Projection. * * @param lat0 origin of projection coord system is at * (lat0, tangentLon) * @param tangentLon longitude that the cylinder is tangent at * ("central meridian") * @param scale scale factor along the central meridian */ public TransverseMercator(double lat0, double tangentLon, double scale) { this.lat0 = Math.toRadians(lat0); this.lon0 = Math.toRadians(tangentLon); this.scale = scale * EARTH_RADIUS; origin = new LatLonPointImpl(lat0, tangentLon); addParameter(ATTR_NAME, "transverse_mercator"); addParameter("longitude_of_central_meridian", tangentLon); addParameter("latitude_of_projection_origin", lat0); addParameter("scale_factor_at_central_meridian", scale); }
addParameter(ATTR_NAME, "transverse_mercator"); addParameter("longitude_of_central_meridian", tangentLon); addParameter("latitude_of_projection_origin", lat0); addParameter("scale_factor_at_central_meridian", scale); addParameter("false_easting", falseEasting); addParameter("false_northing", falseNorthing); addParameter("units", "km");