Package dev.avelar.mapnik
Class Projection
java.lang.Object
dev.avelar.mapnik.Projection
- All Implemented Interfaces:
AutoCloseable
A coordinate reference system, such as
epsg:3857 or a PROJ string. Converts between
geographic (longitude, latitude) and projected coordinates. To convert between two projections,
use CoordinateTransform.
Safe to share between threads: calls on one object take turns. (For speed, give each thread its
own, which takes microseconds to make.)-
Method Summary
Modifier and TypeMethodDescriptionThe geographic area the projection is meant for, if known, as longitude/latitude degrees.voidclose()The PROJ definition.A human-readable name, for exampleWGS 84.forward(double lon, double lat) Geographic (x = longitude, y = latitude) to this projection's coordinates.inverse(double x, double y) This projection's coordinates to geographic (x = longitude, y = latitude).booleanTrue for longitude/latitude systems.static ProjectionCreate fromepsg:<code>or a PROJ string.params()The string this projection was created from.
-
Method Details
-
of
Create fromepsg:<code>or a PROJ string. ThrowsMapnikExceptionif it is invalid. -
params
The string this projection was created from. -
definition
The PROJ definition. -
description
A human-readable name, for exampleWGS 84. -
isGeographic
public boolean isGeographic()True for longitude/latitude systems. -
areaOfUse
The geographic area the projection is meant for, if known, as longitude/latitude degrees. -
forward
Geographic (x = longitude, y = latitude) to this projection's coordinates. -
inverse
This projection's coordinates to geographic (x = longitude, y = latitude). -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-