All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.geotoolkit.referencing.operation.provider.EquidistantCylindrical Maven / Gradle / Ivy

/*
 *    Geotoolkit.org - An Open Source Java GIS Toolkit
 *    http://www.geotoolkit.org
 *
 *    (C) 2005-2012, Open Source Geospatial Foundation (OSGeo)
 *    (C) 2009-2012, Geomatys
 *
 *    This library is free software; you can redistribute it and/or
 *    modify it under the terms of the GNU Lesser General Public
 *    License as published by the Free Software Foundation;
 *    version 2.1 of the License.
 *
 *    This library is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *    Lesser General Public License for more details.
 */
package org.geotoolkit.referencing.operation.provider;

import net.jcip.annotations.Immutable;

import org.opengis.metadata.citation.Citation;
import org.opengis.parameter.ParameterValueGroup;
import org.opengis.parameter.ParameterDescriptor;
import org.opengis.parameter.ParameterDescriptorGroup;
import org.opengis.referencing.operation.MathTransform2D;
import org.opengis.referencing.operation.CylindricalProjection;
import org.opengis.referencing.ReferenceIdentifier;

import org.geotoolkit.resources.Vocabulary;
import org.geotoolkit.referencing.NamedIdentifier;
import org.geotoolkit.referencing.operation.projection.Equirectangular;
import org.geotoolkit.metadata.iso.citation.Citations;


/**
 * The provider for "Equidistant Cylindrical" projection
 * (EPSG:1028, EPSG:1029, EPSG:9842, EPSG:9823).
 *
 * {@note EPSG defines two codes for this projection, 1029 being the spherical case and 1028 the
 *        ellipsoidal case. However the formulas are the same in both cases, with an additional
 *        adjustment of Earth radius in the ellipsoidal case. Consequently they are implemented
 *        in Geotk by the same class.}
 *
 * {@note EPSG:1028 and 1029 are the current codes, while EPSG:9842 and 9823 are deprecated codes.
 *        The new and deprecated definitions differ only by their names. In the Geotk implementation,
 *        both current and legacy definitions are known, but the legacy names are marked as deprecated.}
 *
 * The math transform implementations instantiated by this provider may be any of the following classes:
 * 

*

    *
  • {@link org.geotoolkit.referencing.operation.projection.Equirectangular}
  • *
* * *

The following table summarizes the parameters recognized by this provider. * For a more detailed parameter list, see the {@link #PARAMETERS} constant.

*

Operation name: {@code Equidistant_Cylindrical} *
Area of use: (union of CRS domains of validity in EPSG database)

*
* * *
in latitudes:90°00.0′Sto90°00.0′N
in longitudes:180°00.0′Wto180°00.0′E
* * * * * * * * * *
Parameter nameDefault value
{@code semi_major}
{@code semi_minor}
{@code roll_longitude}false
{@code central_meridian}
{@code latitude_of_origin}
{@code false_easting}0 metres
{@code false_northing}0 metres
* * * @author John Grange * @author Martin Desruisseaux (Geomatys) * @version 3.20 * * @see Equirectangular on RemoteSensing.org * @see Geotk coordinate operations matrix * * @since 2.2 * @module */ @Immutable public class EquidistantCylindrical extends MapProjection { /** * For cross-version compatibility. */ private static final long serialVersionUID = -278288251842178001L; /** * The operation parameter descriptor for the {@linkplain * org.geotoolkit.referencing.operation.projection.UnitaryProjection.Parameters#centralMeridian * central meridian} parameter value. * * This parameter is mandatory. * Valid values range is [-180 … 180]° and default value is 0°. * * @deprecated Invoke {@linkplain #PARAMETERS}.{@linkplain ParameterDescriptorGroup#descriptor(String) * descriptor(String)} instead. */ @Deprecated public static final ParameterDescriptor CENTRAL_MERIDIAN; /** * The operation parameter descriptor for the {@linkplain * org.geotoolkit.referencing.operation.projection.UnitaryProjection.Parameters#latitudeOfOrigin * latitude of origin} parameter value. * * This parameter is mandatory. * Valid values range is [-90 … 90]° and default value is 0°. * * @deprecated Invoke {@linkplain #PARAMETERS}.{@linkplain ParameterDescriptorGroup#descriptor(String) * descriptor(String)} instead. */ @Deprecated public static final ParameterDescriptor LATITUDE_OF_ORIGIN; /** * The operation parameter descriptor for the {@linkplain * org.geotoolkit.referencing.operation.projection.UnitaryProjection.Parameters#falseEasting * false easting} parameter value. * * This parameter is mandatory. * Valid values range is unrestricted and default value is 0 metre. * * @deprecated Invoke {@linkplain #PARAMETERS}.{@linkplain ParameterDescriptorGroup#descriptor(String) * descriptor(String)} instead. */ @Deprecated public static final ParameterDescriptor FALSE_EASTING; /** * The operation parameter descriptor for the {@linkplain * org.geotoolkit.referencing.operation.projection.UnitaryProjection.Parameters#falseNorthing * false northing} parameter value. * * This parameter is mandatory. * Valid values range is unrestricted and default value is 0 metre. * * @deprecated Invoke {@linkplain #PARAMETERS}.{@linkplain ParameterDescriptorGroup#descriptor(String) * descriptor(String)} instead. */ @Deprecated public static final ParameterDescriptor FALSE_NORTHING; /** * The group of all parameters expected by this coordinate operation. * The following table lists the operation names and the parameters recognized by Geotk: *

* *

* * * * * * * * *
* * * * * * * * * * * * * * *
Name:OGC:Equidistant_Cylindrical
Alias:EPSG:Equidistant Cylindrical
EPSG:Equidistant Cylindrical (Spherical)
ESRI:Equidistant_Cylindrical
OGC:Equirectangular
GeoTIFF:CT_Equirectangular
PROJ4:eqc
Geotk:Equidistant cylindrical projection
Identifier:EPSG:1028
EPSG:1029
EPSG:9842
EPSG:9823
GeoTIFF:17
*
* * * * * * *
Name:OGC:semi_major
Alias:EPSG:Semi-major axis
ESRI:Semi_Major
GeoTIFF:SemiMajor
PROJ4:a
*
* * * * *
Type:{@code Double}
Obligation:mandatory
Value range:[0…∞) metres
*
* * * * * * *
Name:OGC:semi_minor
Alias:EPSG:Semi-minor axis
ESRI:Semi_Minor
GeoTIFF:SemiMinor
PROJ4:b
*
* * * * *
Type:{@code Double}
Obligation:mandatory
Value range:[0…∞) metres
*
* * *
Name:Geotk:roll_longitude
*
* * * * *
Type:{@code Boolean}
Obligation:optional
Default value:false
*
* * * * * * * *
Name:OGC:central_meridian
Alias:EPSG:Longitude of natural origin
ESRI:Central_Meridian
GeoTIFF:ProjCenterLong
PROJ4:lon_0
EPSG:Longitude of false origin
*
* * * * * *
Type:{@code Double}
Obligation:mandatory
Value range:[-180 … 180]°
Default value:
*
* * * * * * * *
Name:OGC:latitude_of_origin
Alias:EPSG:Latitude of 1st standard parallel
ESRI:Standard_Parallel_1
GeoTIFF:ProjCenterLat
PROJ4:lat_0
EPSG:Latitude of natural origin
*
* * * * * *
Type:{@code Double}
Obligation:mandatory
Value range:[-90 … 90]°
Default value:
*
* * * * * * *
Name:OGC:false_easting
Alias:EPSG:False easting
ESRI:False_Easting
GeoTIFF:FalseEasting
PROJ4:x_0
*
* * * * * *
Type:{@code Double}
Obligation:mandatory
Value range:(-∞ … ∞) metres
Default value:0 metres
*
* * * * * * *
Name:OGC:false_northing
Alias:EPSG:False northing
ESRI:False_Northing
GeoTIFF:FalseNorthing
PROJ4:y_0
*
* * * * * *
Type:{@code Double}
Obligation:mandatory
Value range:(-∞ … ∞) metres
Default value:0 metres
*
*/ public static final ParameterDescriptorGroup PARAMETERS; static { final Citation[] excludes = new Citation[] {Citations.NETCDF}; CENTRAL_MERIDIAN = UniversalParameters.CENTRAL_MERIDIAN.select(null, null, excludes, new String[] { "Longitude of false origin"}, // EPSG (deprecated - was used by EPSG:9842 only) "Longitude of natural origin", // EPSG "central_meridian", // OGC "Central_Meridian", // ESRI "ProjCenterLong"); // GeoTIFF LATITUDE_OF_ORIGIN = UniversalParameters.LATITUDE_OF_ORIGIN.select(null, null, excludes, new String[] { "Latitude of natural origin"}, // EPSG (deprecated - was used by EPSG:9842 and 9823) "Latitude of 1st standard parallel", // EPSG "latitude_of_origin", // OGC "Standard_Parallel_1", // ESRI "ProjCenterLat"); // GeoTIFF // Following are the same than Mercator1SP except for the exclusion list. FALSE_EASTING = UniversalParameters.FALSE_EASTING.select(excludes, "False easting", // EPSG "FalseEasting"); // GeoTIFF FALSE_NORTHING = UniversalParameters.FALSE_NORTHING.select(excludes, "False northing", // EPSG "FalseNorthing"); // GeoTIFF PARAMETERS = UniversalParameters.createDescriptorGroup(new ReferenceIdentifier[] { new NamedIdentifier(Citations.OGC, "Equidistant_Cylindrical"), new NamedIdentifier(Citations.EPSG, "Equidistant Cylindrical"), new NamedIdentifier(Citations.EPSG, "Equidistant Cylindrical (Spherical)"), new IdentifierCode (Citations.EPSG, 1028), // The ellipsoidal case new IdentifierCode (Citations.EPSG, 1029), // The spherical case new IdentifierCode (Citations.EPSG, 9842, 1028), // Deprecated new IdentifierCode (Citations.EPSG, 9823, 1029), // Deprecated new NamedIdentifier(Citations.ESRI, "Equidistant_Cylindrical"), new NamedIdentifier(Citations.OGC, "Equirectangular"), new NamedIdentifier(Citations.GEOTIFF, "CT_Equirectangular"), new IdentifierCode (Citations.GEOTIFF, 17), new NamedIdentifier(Citations.PROJ4, "eqc"), new NamedIdentifier(Citations.GEOTOOLKIT, Vocabulary.formatInternational( Vocabulary.Keys.EQUIDISTANT_CYLINDRICAL_PROJECTION)) }, excludes, new ParameterDescriptor[] { SEMI_MAJOR, SEMI_MINOR, ROLL_LONGITUDE, CENTRAL_MERIDIAN, LATITUDE_OF_ORIGIN, FALSE_EASTING, FALSE_NORTHING }, MapProjectionDescriptor.ADD_EARTH_RADIUS); } /** * Constructs a new provider. */ public EquidistantCylindrical() { super(PARAMETERS); } /** * Constructs a new provider for the given parameters. */ EquidistantCylindrical(ParameterDescriptorGroup parameters) { super(parameters); } /** * Returns the operation type for this map projection. */ @Override public Class getOperationType() { return CylindricalProjection.class; } /** * {@inheritDoc} */ @Override protected MathTransform2D createMathTransform(ParameterValueGroup values) { return Equirectangular.create(getParameters(), values); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy