public class CrsRegistry extends Object
CoordinateReferenceSystem
s.
Currently, the registry is limited to EPSG-defined coordinate reference systems.
Constructor and Description |
---|
CrsRegistry() |
Modifier and Type | Method and Description |
---|---|
static CoordinateReferenceSystem<?> |
getCoordinateReferenceSystemForEPSG(int epsgCode,
CoordinateReferenceSystem<?> fallback)
returns the
CoordinateReferenceSystem for the specified EPSG code. |
static CrsId |
getCrsIdForEPSG(int epsgCode)
Returns the
CrsId for the specified EPSG Code. |
static Geographic2DCoordinateReferenceSystem |
getGeographicCoordinateReferenceSystemForEPSG(int epsgCode) |
static ProjectedCoordinateReferenceSystem |
getProjectedCoordinateReferenceSystemForEPSG(int epsgCode) |
static boolean |
hasCoordinateReferenceSystemForEPSG(int epsgCode)
Determine if the registry contains the
CoordinateReferenceSystem identified by its SRID |
static CoordinateReferenceSystem<?> |
ifAbsentReturnProjected2D(int epsgCode)
Returns the registered coordinate reference system, or when unavailable in the registry, create a new Projected 2D system and register
this on-the-fly.
|
static void |
registerCoordinateReferenceSystem(CoordinateReferenceSystem<?> crs)
Registers a
CoordinateReferenceSystem in the registry under the specified (pseudo-)EPSG code. |
public static CoordinateReferenceSystem<?> getCoordinateReferenceSystemForEPSG(int epsgCode, CoordinateReferenceSystem<?> fallback)
CoordinateReferenceSystem
for the specified EPSG code.epsgCode
- the EPSG codefallback
- the coordinateCoordinateReferenceSystem
corresponding to the specified EPSG code, or null if
no such system is registered.public static CoordinateReferenceSystem<?> ifAbsentReturnProjected2D(int epsgCode)
epsgCode
- the code to look uppublic static void registerCoordinateReferenceSystem(CoordinateReferenceSystem<?> crs)
CoordinateReferenceSystem
in the registry under the specified (pseudo-)EPSG code.crs
- the CoordinateReferenceSystem
to registerpublic static boolean hasCoordinateReferenceSystemForEPSG(int epsgCode)
CoordinateReferenceSystem
identified by its SRIDepsgCode
- the SRID to look upCoordinateReferenceSystem
public static Geographic2DCoordinateReferenceSystem getGeographicCoordinateReferenceSystemForEPSG(int epsgCode)
public static ProjectedCoordinateReferenceSystem getProjectedCoordinateReferenceSystemForEPSG(int epsgCode)
public static CrsId getCrsIdForEPSG(int epsgCode)
CrsId
for the specified EPSG Code.epsgCode
- the EPSG codeCrsId
corresponding to the specified EPSG code, or null if
no such system is registered.Copyright © 2022 geolatte.org. All rights reserved.