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 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)
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 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 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 FactoryExceptionpublic static ParameterValueGroup getProjectionParameters(String projectionName) throws NoSuchIdentifierException
projectionName - NoSuchIdentifierExceptionpublic static void updateEllipsoidParams(ParameterValueGroup parameters, Ellipsoid ellipsoid)
parameters - ellipsoid - public static DefiningConversion createConversionFromBase(String name, MathTransform transform)
DefiningConversion object from the input MathTransformname - transform - public static GeodeticDatum createGeodeticDatum(String name, Ellipsoid ellipsoid)
GeodeticDatum on top of a specific Ellipsoid instance, using
DefaultPrimeMeridian.GREENWICH as primeMeridian.name - ellipsoid - public static GeographicCRS createGeographicCRS(String name, GeodeticDatum datum)
GeographicCRS given the name to be assigned and the GeodeticDatum to
be used. EllipsoidalCS is name - datum - ellipsoidalCS - 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.name - datum - ellipsoidalCS - public static ProjectedCRS createProjectedCRS(Map<String,?> props, GeographicCRS baseCRS, DefiningConversion conversionFromBase, MathTransform transform)
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.props - baseCRS - conversionFromBase - transform - public static Ellipsoid createEllipsoid(String name, Map<String,Number> ellipsoidParams)
Ellipsoid provided the name and a Map contains #SEMI_MAJOR, #SEMI_MINOR,
NetCDFUtilities.INVERSE_FLATTENINGname - ellipsoidParams - public static CoordinateReferenceSystem buildCRS(Map<String,?> props, ParameterValueGroup parameters, Ellipsoid ellipsoid) throws NoSuchIdentifierException, FactoryException
CoordinateReferenceSystem parsing Conversion parameters and
Ellipsoidprops - parameters - ellipsoid - NoSuchIdentifierExceptionFactoryExceptionpublic static MathTransform createTransform(ParameterValueGroup parameters) throws NoSuchIdentifierException, FactoryException
public static ParameterValueGroup getDefaultparameters(String projectionName) throws NoSuchIdentifierException
ParameterValueGroup parameters instance for the specified projectionName.projectionName - NoSuchIdentifierExceptionCopyright © 1996–2019 Geotools. All rights reserved.