Class Wrappers
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AxisOrderaxisOrder(org.opengis.referencing.cs.CoordinateSystem cs) Returns the axis order of the given coordinate system.static org.opengis.referencing.crs.SingleCRSgeoapi(CoordinateReferenceSystem impl, boolean is3D) Wraps the given PROJ4J CRS behind the equivalent GeoAPI interface.static org.opengis.referencing.operation.CoordinateOperationFactoryWraps the given PROJ4J coordinate operation factory behind the equivalent GeoAPI interface.static org.opengis.referencing.operation.CoordinateOperationgeoapi(CoordinateTransform impl, boolean is3D) Wraps the given PROJ4J coordinate transform behind the equivalent GeoAPI interface.static org.opengis.referencing.crs.CRSAuthorityFactorygeoapi(CRSFactory impl) Wraps the given PROJ4J CRS factory behind the equivalent GeoAPI interface.static org.opengis.referencing.datum.GeodeticDatumWraps the given PROJ4J datum behind the equivalent GeoAPI interface.static org.opengis.referencing.datum.EllipsoidWraps the given PROJ4J ellipsoid behind the equivalent GeoAPI interface.static org.opengis.referencing.datum.PrimeMeridiangeoapi(PrimeMeridian impl) Wraps the given PROJ4J ellipsoid behind the equivalent GeoAPI interface.static org.opengis.parameter.ParameterValueGroupgeoapi(Projection impl) Wraps the given PROJ4J projection behind the equivalent GeoAPI interface.static org.opengis.geometry.DirectPositiongeoapi(ProjCoordinate impl) Wraps the given PROJ4J coordinate tuple behind the equivalent GeoAPI interface.static ProjCoordinateproj4j(org.opengis.geometry.DirectPosition src) Returns the given position as a PROJ4J coordinate tuple.static Projectionproj4j(org.opengis.parameter.ParameterValueGroup src) Returns the given parameters as a PROJ4J implementation.static CRSFactoryproj4j(org.opengis.referencing.crs.CRSAuthorityFactory src) Returns the given authority factory as a PROJ4J implementation.static CoordinateReferenceSystemproj4j(org.opengis.referencing.crs.SingleCRS src) Returns the given CRS as a PROJ4J implementation.static Ellipsoidproj4j(org.opengis.referencing.datum.Ellipsoid src) Returns the given ellipsoid as a PROJ4J implementation.static Datumproj4j(org.opengis.referencing.datum.GeodeticDatum src) Returns the given datum as a PROJ4J implementation.static PrimeMeridianproj4j(org.opengis.referencing.datum.PrimeMeridian src) Returns the given prime meridian as a PROJ4J implementation.static CoordinateTransformproj4j(org.opengis.referencing.operation.CoordinateOperation src) Returns the given coordinate operation as a PROJ4J implementation.static CoordinateTransformFactoryproj4j(org.opengis.referencing.operation.CoordinateOperationFactory src) Returns the given coordinate operation factory as a PROJ4J implementation.
-
Constructor Details
-
Wrappers
private Wrappers()Do not allow instantiation of this class.
-
-
Method Details
-
geoapi
Wraps the given PROJ4J CRS factory behind the equivalent GeoAPI interface. The returned factory support only the creation of geographic and projected CRSs.- Parameters:
impl- the implementation to wrap, ornull- Returns:
- the view, or
nullif the given implementation was null
-
proj4j
Returns the given authority factory as a PROJ4J implementation. This method returns the backing implementation.This is a convenience method for
Importer.convert(CRSAuthorityFactory)on a default instance ofImporter.- Parameters:
src- the object to unwrap or convert, ornull- Returns:
- the PROJ4J implementation, or
nullif the given object was null - Throws:
UnconvertibleInstanceException- if the given object cannot be unwrapped or converted
-
geoapi
public static org.opengis.referencing.crs.SingleCRS geoapi(CoordinateReferenceSystem impl, boolean is3D) Wraps the given PROJ4J CRS behind the equivalent GeoAPI interface. The returned object is a view: if anyimplvalue is changed after this method call, those changes will be reflected immediately in the returned view. Note that CRS objects should be immutable. Therefore, it is recommended to not apply any change onimpl.There is one exception to above paragraph: this method determines immediately whether the given CRS is a
GeographicCRSorProjectedCRS. That type of the view cannot be changed after construction.- Parameters:
impl- the implementation to wrap, ornullis3D- whether to return a three-dimensional CRS instead of a two-dimensional one- Returns:
- the view, or
nullif the given implementation was null
-
proj4j
Returns the given CRS as a PROJ4J implementation. This method tries to return the backing implementation if possible, or otherwise copies the properties in a new PROJ4J instance.This is a convenience method for
Importer.convert(SingleCRS)on a default instance ofImporter.- Parameters:
src- the object to unwrap or convert, ornull- Returns:
- the PROJ4J implementation, or
nullif the given object was null - Throws:
UnconvertibleInstanceException- if the given object cannot be unwrapped or converted
-
geoapi
Wraps the given PROJ4J datum behind the equivalent GeoAPI interface. The returned object is a view: if anyimplvalue is changed after this method call, those changes will be reflected immediately in the returned view. Note that CRS objects should be immutable. Therefore, it is recommended to not apply any change onimpl.- Parameters:
impl- the implementation to wrap, ornull- Returns:
- the view, or
nullif the given implementation was null
-
proj4j
Returns the given datum as a PROJ4J implementation. This method tries to return the backing implementation if possible, or otherwise copies the properties in a new PROJ4J instance.This is a convenience method for
Importer.convert(GeodeticDatum)on a default instance ofImporter.- Parameters:
src- the object to unwrap or convert, ornull- Returns:
- the PROJ4J implementation, or
nullif the given object was null - Throws:
UnconvertibleInstanceException- if the given object cannot be unwrapped or converted
-
geoapi
Wraps the given PROJ4J ellipsoid behind the equivalent GeoAPI interface. The returned object is a view: if anyimplvalue is changed after this method call, those changes will be reflected immediately in the returned view. Note that CRS objects should be immutable. Therefore, it is recommended to not apply any change onimpl.- Parameters:
impl- the implementation to wrap, ornull- Returns:
- the view, or
nullif the given implementation was null
-
proj4j
Returns the given ellipsoid as a PROJ4J implementation. This method tries to return the backing implementation if possible, or otherwise copies the properties in a new PROJ4J instance.This is a convenience method for
Importer.convert(Ellipsoid)on a default instance ofImporter.- Parameters:
src- the object to unwrap or convert, ornull- Returns:
- the PROJ4J implementation, or
nullif the given object was null - Throws:
UnconvertibleInstanceException- if the given object cannot be unwrapped or converted
-
geoapi
Wraps the given PROJ4J ellipsoid behind the equivalent GeoAPI interface. The returned object is a view: if anyimplvalue is changed after this method call, those changes will be reflected immediately in the returned view. Note that CRS objects should be immutable. Therefore, it is recommended to not apply any change onimpl.- Parameters:
impl- the implementation to wrap, ornull- Returns:
- the view, or
nullif the given implementation was null
-
proj4j
Returns the given prime meridian as a PROJ4J implementation. This method tries to return the backing implementation if possible, or an equivalent PROJ4J instance otherwise.This is a convenience method for
Importer.convert(PrimeMeridian)on a default instance ofImporter.- Parameters:
src- the object to unwrap, ornull- Returns:
- the PROJ4J implementation, or
nullif the given object was null - Throws:
UnconvertibleInstanceException- if the given object cannot be unwrapped or converted
-
geoapi
Wraps the given PROJ4J projection behind the equivalent GeoAPI interface. The returned object is a view: if anyimplvalue is changed after this method call, those changes will be reflected immediately in the returned view. The view is bidirectional: setting a value in the returned parameters modify a property of the given projection.- Parameters:
impl- the implementation to wrap, ornull- Returns:
- the view, or
nullif the given implementation was null
-
proj4j
Returns the given parameters as a PROJ4J implementation. This method tries to return the backing implementation if possible, or an equivalent PROJ4J instance otherwise.This is a convenience method for
Importer.convert(ParameterValueGroup)on a default instance ofImporter.- Parameters:
src- the object to unwrap, ornull- Returns:
- the PROJ4J implementation, or
nullif the given object was null - Throws:
UnconvertibleInstanceException- if the given object cannot be unwrapped or converted
-
geoapi
public static org.opengis.referencing.operation.CoordinateOperationFactory geoapi(CoordinateTransformFactory impl) Wraps the given PROJ4J coordinate operation factory behind the equivalent GeoAPI interface.- Parameters:
impl- the implementation to wrap, ornull- Returns:
- the view, or
nullif the given implementation was null
-
proj4j
public static CoordinateTransformFactory proj4j(org.opengis.referencing.operation.CoordinateOperationFactory src) Returns the given coordinate operation factory as a PROJ4J implementation. This method returns the backing implementation.This is a convenience method for
Importer.convert(CoordinateOperationFactory)on a default instance ofImporter.- Parameters:
src- the object to unwrap or convert, ornull- Returns:
- the PROJ4J implementation, or
nullif the given object was null - Throws:
UnconvertibleInstanceException- if the given object cannot be unwrapped or converted
-
geoapi
public static org.opengis.referencing.operation.CoordinateOperation geoapi(CoordinateTransform impl, boolean is3D) Wraps the given PROJ4J coordinate transform behind the equivalent GeoAPI interface. The returned object is a view: if anyimplvalue is changed after this method call, those changes will be reflected immediately in the returned view. Note that referencing objects should be immutable. Therefore, it is recommended to not apply any change onimpl.- Parameters:
impl- the implementation to wrap, ornullis3D- whether to return a three-dimensional operation instead of a two-dimensional one- Returns:
- the view, or
nullif the given implementation was null
-
proj4j
Returns the given coordinate operation as a PROJ4J implementation. This method returns the backing implementation.This is a convenience method for
Importer.convert(CoordinateOperation)on a default instance ofImporter.- Parameters:
src- the object to unwrap or convert, ornull- Returns:
- the PROJ4J implementation, or
nullif the given object was null - Throws:
UnconvertibleInstanceException- if the given object cannot be unwrapped or converted
-
geoapi
Wraps the given PROJ4J coordinate tuple behind the equivalent GeoAPI interface. The returned object is a view: if anyimplvalue is changed after this method call, those changes will be reflected immediately in the returned view. Conversely, setting a value in the returned view set the corresponding value in the given implementation.- Parameters:
impl- the implementation to wrap, ornull- Returns:
- the view, or
nullif the given implementation was null
-
proj4j
Returns the given position as a PROJ4J coordinate tuple. This method tries to return the backing implementation if possible, or otherwise copies the coordinate values in a new coordinate tuple.- Parameters:
src- the position to unwrap or convert, ornull- Returns:
- the coordinates, or
nullif the given object was null
-
axisOrder
Returns the axis order of the given coordinate system.- Parameters:
cs- the coordinate system for which to get the axis order, ornull- Returns:
- the axis order, or
nullif the given coordinate system was null - Throws:
UnconvertibleInstanceException- if the coordinate system uses an unsupported axis order
-