public final class Projections extends Object
Modifier and Type | Field and Description |
---|---|
private static Set<String> |
allCodes |
private static Map<String,ProjectionChoice> |
allProjectionChoicesByCode |
static Map<String,Datum> |
datums |
static Map<String,Ellipsoid> |
ellipsoids |
static Map<String,Pair<String,String>> |
inits |
static Map<String,NTV2GridShiftFileWrapper> |
nadgrids |
private static Map<String,Projection> |
projectionsByCode_cache |
static Map<String,ProjFactory> |
projs
Registry for custom projection
should be compatible to PROJ.4
|
Modifier | Constructor and Description |
---|---|
private |
Projections() |
Modifier and Type | Method and Description |
---|---|
static Collection<String> |
getAllProjectionCodes() |
static Proj |
getBaseProjection(String id) |
static Datum |
getDatum(String id) |
static Ellipsoid |
getEllipsoid(String id) |
static String |
getInit(String id)
Get the projection definition string for the given id.
|
static NTV2GridShiftFileWrapper |
getNTV2Grid(String id) |
static Projection |
getProjectionByCode(String code) |
static LatLon |
inverseProject(EastNorth en) |
private static void |
loadInits()
Load +init "presets" from file
|
static EastNorth |
project(LatLon ll) |
static void |
registerBaseProjection(String id,
Class<? extends Proj> projClass,
String origin) |
static void |
registerBaseProjection(String id,
ProjFactory fac,
String origin)
Plugins can register additional base projections.
|
public static final Map<String,ProjFactory> projs
public static final Map<String,Ellipsoid> ellipsoids
public static final Map<String,NTV2GridShiftFileWrapper> nadgrids
private static final Map<String,ProjectionChoice> allProjectionChoicesByCode
private static final Map<String,Projection> projectionsByCode_cache
private Projections()
public static LatLon inverseProject(EastNorth en)
public static void registerBaseProjection(String id, ProjFactory fac, String origin)
id
- The "official" PROJ.4 id. In case the projection is not supported
by PROJ.4, use some prefix, e.g. josm:myproj or gdal:otherproj.fac
- The base projection factory.origin
- Multiple plugins may implement the same base projection.
Provide plugin name or similar string, so it be differentiated.public static void registerBaseProjection(String id, Class<? extends Proj> projClass, String origin)
public static Proj getBaseProjection(String id)
public static Ellipsoid getEllipsoid(String id)
public static NTV2GridShiftFileWrapper getNTV2Grid(String id)
public static String getInit(String id)
id
- the idprivate static void loadInits()
public static Projection getProjectionByCode(String code)
public static Collection<String> getAllProjectionCodes()