public class ProjectionBuilder extends Object
ProjectedCRS
instance on top of Projection name, parameters
and Ellipsoid. A default datum will be created on top of that ellipsoid.Modifier and Type | Field and Description |
---|---|
static String |
AXIS_UNIT |
static EllipsoidalCS |
DEFAULT_ELLIPSOIDAL_CS |
Constructor and Description |
---|
ProjectionBuilder() |
Modifier and Type | Method and Description |
---|---|
static CoordinateReferenceSystem |
buildCRS(Map<String,?> props,
ParameterValueGroup parameters,
Ellipsoid ellipsoid)
Build a Projected
CoordinateReferenceSystem parsing Conversion parameters and
Ellipsoid |
static DefiningConversion |
createConversionFromBase(String name,
MathTransform transform)
Create a
DefiningConversion object from the input MathTransform |
static Ellipsoid |
createEllipsoid(String name,
Map<String,Number> ellipsoidParams)
Build a custom
Ellipsoid provided the name and a Map contains |
static GeodeticDatum |
createGeodeticDatum(String name,
Ellipsoid ellipsoid)
Build a Default
GeodeticDatum on top of a specific Ellipsoid instance, using
DefaultPrimeMeridian.GREENWICH as primeMeridian. |
static GeographicCRS |
createGeographicCRS(String name,
GeodeticDatum datum)
Build a
GeographicCRS given the name to be assigned and the GeodeticDatum to
be used. |
static GeographicCRS |
createGeographicCRS(String name,
GeodeticDatum datum,
EllipsoidalCS ellipsoidalCS)
Build a
GeographicCRS given the name to be assigned, the GeodeticDatum to be
used and the EllipsoidalCS . |
static ProjectedCRS |
createProjectedCRS(Map<String,?> props,
GeographicCRS baseCRS,
DefiningConversion conversionFromBase,
MathTransform transform) |
static ProjectedCRS |
createProjectedCRS(Map<String,?> props,
GeographicCRS baseCRS,
DefiningConversion conversionFromBase,
MathTransform transform,
CartesianCS derivedCS)
Build a
ProjectedCRS given the base GeographicCRS , the DefiningConversion instance from Base as well as the MathTransform from the base CRS
to returned CRS. |
static CoordinateReferenceSystem |
createProjection(String projectionName,
String code,
Double semiMajor,
Double inverseFlattening,
Map<String,Double> params)
Quick method to create a
CoordinateReferenceSystem instance, given the OGC
ProjectionName, such as "lambert_conformal_conic_2sp"), a custom code number for it, the
semiMajor, the inverseFlattening (when infinity, assuming the reference ellipsoid is a
spheroid), and the Projection Params through a |
static MathTransform |
createTransform(ParameterValueGroup parameters) |
static DefiningConversion |
getConversion(ParameterValueGroup parameters,
String name) |
static ParameterValueGroup |
getDefaultparameters(String projectionName)
Get a
ParameterValueGroup parameters instance for the specified projectionName. |
static ParameterValueGroup |
getProjectionParameters(String projectionName)
Get Projection parameters from the specified projection name.
|
static void |
updateEllipsoidParams(ParameterValueGroup parameters,
Ellipsoid ellipsoid)
Make sure to set SEMI_MINOR and SEMI_MAJOR projection's parameters from the ellipsoid
definition
|
public static final String AXIS_UNIT
public static final EllipsoidalCS DEFAULT_ELLIPSOIDAL_CS
public static CoordinateReferenceSystem createProjection(String projectionName, String code, Double semiMajor, Double inverseFlattening, Map<String,Double> params) throws FactoryException
CoordinateReferenceSystem
instance, given the OGC
ProjectionName, such as "lambert_conformal_conic_2sp"), a custom code number for it, the
semiMajor, the inverseFlattening (when infinity, assuming the reference ellipsoid is a
spheroid), and the Projection Params through a FactoryException
public static ParameterValueGroup getProjectionParameters(String projectionName) throws NoSuchIdentifierException
NoSuchIdentifierException
public static void updateEllipsoidParams(ParameterValueGroup parameters, Ellipsoid ellipsoid)
public static DefiningConversion createConversionFromBase(String name, MathTransform transform)
DefiningConversion
object from the input MathTransform
public static GeodeticDatum createGeodeticDatum(String name, Ellipsoid ellipsoid)
GeodeticDatum
on top of a specific Ellipsoid
instance, using
DefaultPrimeMeridian.GREENWICH
as primeMeridian.public static GeographicCRS createGeographicCRS(String name, GeodeticDatum datum)
GeographicCRS
given the name to be assigned and the GeodeticDatum
to
be used. EllipsoidalCS
is DEFAULT_ELLIPSOIDAL_CS
public static GeographicCRS createGeographicCRS(String name, GeodeticDatum datum, EllipsoidalCS ellipsoidalCS)
GeographicCRS
given the name to be assigned, the GeodeticDatum
to be
used and the EllipsoidalCS
.public static ProjectedCRS createProjectedCRS(Map<String,?> props, GeographicCRS baseCRS, DefiningConversion conversionFromBase, MathTransform transform)
public static ProjectedCRS createProjectedCRS(Map<String,?> props, GeographicCRS baseCRS, DefiningConversion conversionFromBase, MathTransform transform, CartesianCS derivedCS)
ProjectedCRS
given the base GeographicCRS
, the DefiningConversion
instance from Base as well as the MathTransform
from the base CRS
to returned CRS. The derivedCS is DefaultCartesianCS.PROJECTED
by default.public static Ellipsoid createEllipsoid(String name, Map<String,Number> ellipsoidParams)
Ellipsoid
provided the name and a Map contains NetCDFUtilities.SEMI_MAJOR
, NetCDFUtilities.SEMI_MINOR
, NetCDFUtilities.INVERSE_FLATTENING
public static CoordinateReferenceSystem buildCRS(Map<String,?> props, ParameterValueGroup parameters, Ellipsoid ellipsoid) throws NoSuchIdentifierException, FactoryException
CoordinateReferenceSystem
parsing Conversion parameters and
Ellipsoidpublic static DefiningConversion getConversion(ParameterValueGroup parameters, String name)
public static MathTransform createTransform(ParameterValueGroup parameters) throws NoSuchIdentifierException, FactoryException
public static ParameterValueGroup getDefaultparameters(String projectionName) throws NoSuchIdentifierException
ParameterValueGroup
parameters instance for the specified projectionName.NoSuchIdentifierException
Copyright © 1996–2022 Geotools. All rights reserved.