public class CoordinateTransformer
extends java.lang.Object
DefaultGeographicCRS.WGS84| Constructor and Description |
|---|
CoordinateTransformer(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
Create transformer from CRS
|
| Modifier and Type | Method and Description |
|---|---|
static org.opengis.referencing.crs.CoordinateReferenceSystem |
decode(java.lang.String s)
Decode CRS from a string.
|
double[] |
transform(double[] from,
int dimension)
Transform an array of coordinates to
DefaultGeographicCRS.WGS84 |
public CoordinateTransformer(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
throws org.opengis.referencing.FactoryException
crs - the CRSorg.opengis.referencing.FactoryException - if no transformation for the CRS could be foundpublic double[] transform(double[] from,
int dimension)
throws org.opengis.referencing.operation.TransformException
DefaultGeographicCRS.WGS84from - the source array of coordinatesdimension - the dimension of the source coordinates. Allowed values
are <= 0, 2 and 3. If the value is <= 0 the dimension will be
guessed (see guessDimension(double[])).org.opengis.referencing.operation.TransformException - if the coordinates could not be transformedpublic static org.opengis.referencing.crs.CoordinateReferenceSystem decode(java.lang.String s)
throws org.opengis.referencing.FactoryException
CRS.decode(String))CompoundCRSDecoder.decode(String))WKTCRSDecoder.decode(String))s - the stringorg.opengis.referencing.FactoryException - if the CRS could not be parsed