JPROJ4
|
Data Structures | |
enum | Type |
The coordinate reference system (CRS) type returned by PJ#getType(). | |
Public Member Functions | |
PJ (final String definition) throws IllegalArgumentException | |
Creates a new. More... | |
PJ (final PJ crs, final Type type) throws IllegalArgumentException | |
Creates a new. More... | |
native String | getDefinition () |
Returns the Proj4 definition string. More... | |
native Type | getType () |
Returns the Coordinate Reference System type. More... | |
native double | getSemiMajorAxis () |
Returns the value stored in the. More... | |
native double | getSemiMinorAxis () |
Returns the value computed from PJ fields by. More... | |
native double | getEccentricitySquared () |
Returns the square of the ellipsoid eccentricity (ε²). More... | |
native char[] | getAxisDirections () |
Returns an array of character indicating the direction of each axis. More... | |
native double | getGreenwichLongitude () |
Longitude of the prime meridian measured from the Greenwich meridian, positive eastward. More... | |
native double | getLinearUnitToMetre (boolean vertical) |
Returns the conversion factor from the linear units to metres. More... | |
native void | transform (PJ target, int dimension, double[] coordinates, int offset, int numPts) throws PJException |
Transforms in-place the coordinates in the given array. More... | |
native String | getLastError () |
Returns a description of the last error that occurred, or. More... | |
native String | toString () |
Returns the string representation of the PJ structure. More... | |
Static Public Member Functions | |
static native String | getVersion () |
Returns the version number of the Proj4 library. More... | |
Static Public Attributes | |
static final int | DIMENSION_MAX = 100 |
The maximal number of dimension accepted by the transform(PJ, int, double[], int, int) method. More... | |
Protected Member Functions | |
final native void | finalize () |
Deallocates the native PJ data structure. More... | |
native data structure. Almost every methods defined in this class are native methods delegating the work to the Proj.4 library. This class is the only place where such native methods are defined.
In the Proj.4 library, the
structure aggregates in a single place information usually splitted in many different ISO 19111 interfaces: org.opengis.referencing.datum.Ellipsoid, org.opengis.referencing.datum.Datum, org.opengis.referencing.datum.PrimeMeridian, org.opengis.referencing.cs.CoordinateSystem, org.opengis.referencing.crs.CoordinateReferenceSystem and their sub-interfaces. The relationship with the GeoAPI methods is indicated in the "See" tags when appropriate.
PJ | ( | final String | definition | ) | throws IllegalArgumentException |
structure derived from an existing
object. This constructor is usually for getting the org.opengis.referencing.crs.ProjectedCRS::getBaseCRS() base geographic CRS} from a org.opengis.referencing.crs.ProjectedCRS projected CRS}.
crs | The CRS (usually projected) from which to derive a new CRS. |
type | The type of the new CRS. Currently, only Type#GEOGRAPHIC is supported. |
IllegalArgumentException | If the PJ structure can not be created. |
References PJ.finalize(), PJ.getAxisDirections(), PJ.getDefinition(), PJ.getEccentricitySquared(), PJ.getGreenwichLongitude(), PJ.getLastError(), PJ.getLinearUnitToMetre(), PJ.getSemiMajorAxis(), PJ.getSemiMinorAxis(), PJ.getType(), PJ.getVersion(), PJ.toString(), and PJ.transform().
|
static |
Referenced by PJ.PJ().
native String getDefinition | ( | ) |
This is the string given to the constructor, expanded with as much information as possible.
Referenced by PJ.PJ().
native Type getType | ( | ) |
Referenced by PJ.PJ().
native double getSemiMajorAxis | ( | ) |
native double getSemiMinorAxis | ( | ) |
.
Referenced by PJ.PJ().
native double getEccentricitySquared | ( | ) |
The eccentricity is related to axis length by ε=√(1-(b/a)²). The eccentricity of a sphere is zero.
Referenced by PJ.PJ().
native char [] getAxisDirections | ( | ) |
Directions are characters like
for East,
for North and
for Up.
Referenced by PJ.PJ().
native double getGreenwichLongitude | ( | ) |
Referenced by PJ.PJ().
native double getLinearUnitToMetre | ( | boolean | vertical | ) |
vertical |
Referenced by PJ.PJ().
native void transform | ( | PJ | target, |
int | dimension, | ||
double[] | coordinates, | ||
int | offset, | ||
int | numPts | ||
) | throws PJException |
The coordinates array shall contain (x,y,z,…) tuples, where the z and following dimensions are optional. Note that any dimension after the z value are ignored.
Input and output units:
target | The target CRS. |
dimension | The dimension of each coordinate value. Must be in the [2-{ DIMENSION_MAX}] range. |
coordinates | The coordinates to transform, as a sequence of (x,y,<z>,…) tuples. |
offset | Offset of the first coordinate in the given array. |
numPts | Number of points to transform. |
NullPointerException | If the target coordinates |
IndexOutOfBoundsException | if the offset numPts |
PJException | If the operation failed for an other reason (provided by Proj4). |
Referenced by PJ.PJ().
native String getLastError | ( | ) |
native String toString | ( | ) |
Referenced by PJ.PJ().
|
protected |
This method can be invoked only by the garbage collector, and must be invoked exactly once (no more, no less). NEVER INVOKE THIS METHOD EXPLICITELY, NEVER OVERRIDE.
Referenced by PJ.PJ().
|
static |
This upper limit is actually somewhat arbitrary. This limit exists mostly as a safety against potential misuse.