Package org.locationtech.proj4j.geoapi

Wraps the PROJ4J classes behind the equivalent GeoAPI interfaces. This module provides a public class, Wrappers, with overloaded geoapi(…) methods. Those methods expected a PROJ4J object in argument and returns a view of that object as a GeoAPI type.

Dependency to a Unit of Measurement library

This module requires a JSR-385 (Units of Measurement) implementation to be present on the class-path or module-path. The choice of an implementation is left to the user. Some implementations are Indriya, Seshat and Apache SIS. The two latter support EPSG codes for units of measurement.

Mutability

No information is copied. All methods of the views delegate their work to the PROJ4J implementation. Consequently, since PROJ4J objects are mutable, changes to the wrapped PROJ4J object are immediately reflected in the view. However, it is not recommended to change a wrapped PROJ4J object as CRS should be immutable.

There is one exception to the above paragraph: whether an object is a geographic or projected CRS. Because the type of a Java object cannot change dynamically, whether a CRS is geographic or projected is determined at geoapi(CoordinateReferenceSystem) invocation time.

Serialization

The serialization details are not committed API. Serialization is okay for exchanging objects between JVM running the same version of PROJ4J, but is not guaranteed to be compatible between different versions of PROJ4J. This module does not define serialVersionUID because the backing PROJ4J objects do not define those UID anyway.