Class PositionableProjection

Object
CodeList<PositionableProjection>
PositionableProjection
All Implemented Interfaces:
Serializable, Comparable<Positionable­Projection>

public abstract class PositionableProjection extends CodeList<PositionableProjection>
Provider of map projections centered on a point of interest. The point of interest is typically determined by mouse location.
Since:
1.1
See Also:
  • Field Details

    • ORTHOGRAPHIC

      public static final PositionableProjection ORTHOGRAPHIC
      Provides Orthographic projection centered on a point of interest.
    • AZIMUTHAL_EQUIDISTANT

      public static final PositionableProjection AZIMUTHAL_EQUIDISTANT
      Provides Azimuthal Equidistant projection centered on a point of interest. For projection on the ellipsoid, this is valid only under 800 km of the point of interest.
    • UTM

      public static final PositionableProjection UTM
      Provides Universal Transverse Mercator projection for the zone in the point of interest.
    • MERCATOR

      public static final PositionableProjection MERCATOR
      Provides Mercator (variant C) projection centered on a point of interest.
  • Constructor Details

    • PositionableProjection

      protected PositionableProjection(String name)
      Constructs an element of the given name. The new element is automatically added to the list returned by values(). Subclasses shall ensure that only one instance is created for each value because there is no mechanism for removing previously created values.
      Parameters:
      name - the name of the new element. This name shall not be in use by another element of this type.
  • Method Details

    • values

      public static PositionableProjection[] values()
      Returns the list of Positionable­Projections.
      Returns:
      the list of codes declared in the current JVM.
    • family

      public PositionableProjection[] family()
      Returns the list of codes of the same kind than this code list element. Invoking this method is equivalent to invoking values(), except that this method can be invoked on an instance of the parent Code­List class.
      Specified by:
      family in class Code­List<Positionable­Projection>
      Returns:
      all code values for this code list.
    • identifier

      public String identifier()
      Disables the search for UML identifiers because we do not export this package to GeoAPI.
      Overrides:
      identifier in class Code­List<Positionable­Projection>
      Returns:
      null.
    • toString

      public String toString()
      Returns a name for this enumeration which can be used in a user interface.
      Overrides:
      to­String in class Code­List<Positionable­Projection>
      Returns:
      a human-readable name for the projection created by this enumeration.
    • createProjectedCRS

      public ProjectedCRS createProjectedCRS(DirectPosition center) throws FactoryException, TransformException
      Creates a map projection centered on the given position. The position must have a coordinate reference system, but that CRS does not need to be geographic. The projection created by this method will use the same reference frame (datum) than the given position.

      The default implementation converts the position to latitude and longitude values and delegates to create­Projected­CRS(org​.opengis​.referencing​.crs​.Geographic­CRS, double, double).

      Parameters:
      center - the position at the center of the projection to create.
      Returns:
      projection centered on the given position.
      Throws:
      Factory­Exception - if an error occurred while creating the projection.
      Transform­Exception - if an error occurred while converting the given position.
    • createProjectedCRS

      protected abstract ProjectedCRS createProjectedCRS(GeographicCRS baseCRS, double latitude, double longitude) throws FactoryException
      Creates a map projection centered on the given latitude and longitude.
      Parameters:
      base­CRS - the base CRS of the projection to create.
      latitude - latitude of projection center in degrees.
      longitude - longitude of projection center in degrees.
      Returns:
      projection centered on the given position.
      Throws:
      Factory­Exception - if an error occurred while creating the projection.