- All Implemented Interfaces:
Serializable
,Comparable<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:
-
Nested Class Summary
Nested classes/interfaces inherited from class CodeList
CodeList.Filter
-
Field Summary
Modifier and TypeFieldDescriptionstatic final PositionableProjection
Provides Azimuthal Equidistant projection centered on a point of interest.static final PositionableProjection
Provides Mercator (variant C) projection centered on a point of interest.static final PositionableProjection
Provides Orthographic projection centered on a point of interest.static final PositionableProjection
Provides Universal Transverse Mercator projection for the zone in the point of interest. -
Constructor Summary
ModifierConstructorDescriptionprotected
Constructs an element of the given name. -
Method Summary
Modifier and TypeMethodDescriptioncreateProjectedCRS
(DirectPosition center) Creates a map projection centered on the given position.protected abstract ProjectedCRS
createProjectedCRS
(GeographicCRS baseCRS, double latitude, double longitude) Creates a map projection centered on the given latitude and longitude.family()
Returns the list of codes of the same kind than this code list element.Disables the search for UML identifiers because we do not export this package to GeoAPI.Returns a name for this enumeration which can be used in a user interface.static PositionableProjection[]
values()
Returns the list ofPositionableProjection
s.Methods inherited from class CodeList
compareTo, equals, name, names, ordinal, readResolve, valueOf, valueOf
-
Field Details
-
ORTHOGRAPHIC
Provides Orthographic projection centered on a point of interest. -
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
Provides Universal Transverse Mercator projection for the zone in the point of interest. -
MERCATOR
Provides Mercator (variant C) projection centered on a point of interest.
-
-
Constructor Details
-
PositionableProjection
Constructs an element of the given name. The new element is automatically added to the list returned byvalues()
. 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
Returns the list ofPositionableProjection
s.- Returns:
- the list of codes declared in the current JVM.
-
family
Returns the list of codes of the same kind than this code list element. Invoking this method is equivalent to invokingvalues()
, except that this method can be invoked on an instance of the parentCodeList
class.- Specified by:
family
in classCodeList<PositionableProjection>
- Returns:
- all code values for this code list.
-
identifier
Disables the search for UML identifiers because we do not export this package to GeoAPI.- Overrides:
identifier
in classCodeList<PositionableProjection>
- Returns:
null
.
-
toString
Returns a name for this enumeration which can be used in a user interface.- Overrides:
toString
in classCodeList<PositionableProjection>
- 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
createProjectedCRS(org.opengis.referencing.crs.GeographicCRS, double, double)
.- Parameters:
center
- the position at the center of the projection to create.- Returns:
- projection centered on the given position.
- Throws:
FactoryException
- if an error occurred while creating the projection.TransformException
- 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:
baseCRS
- 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:
FactoryException
- if an error occurred while creating the projection.
-