|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectAbstractMathTransform2D.Parameters
UnitaryProjection.Parameters
protected static class UnitaryProjection.Parameters
Parameters that determine the affine transforms to be applied before and after the
UnitaryProjection. Most of those parameters are not used by the unitary
projection itself, but a few ones like the standard
parallels may be on a case-by-case basis.
The lifecycle of this object is as below:
MapProjection.createMathTransform
invokes the static create method of some appropriate UnitaryProjection
subclass. For example both Mercator1SP
and Mercator2SP invokes the same
Mercator.create method, but with different descriptor.
The static factory method creates a new instance of this Parameters class
with the user-supplied ParameterValueGroup. This have the effect of decoding the
parameters in the given group and store their values in the corresponding Parameters
fields. The parameters are then given to the class constructor.
The constructor at step 2 is free to modify the value of any field contained in
the Parameters instance it got in argument. The most typical use cases are to
multiply the scale factor by some value inferred from the
standard parallels, and to restrict the central meridian to the middle of a UTM or MTM zone.
When every fields have their final values, the constructor at steps 2-3 must invoke
validate(). At this point, the scalar values in Parameters should not be
modified anymore. However the constructor is free to apply additional operations on the
two affine transforms (normalize/denormalize) after
validate() has been invoked.
Once the execution point returned to MapProjection, the affine transforms
are marked as immutable and concatenated in that order:
normalize(true),
<the transform created at step 2>,
normalize(false).
The Parameters instance is saved for Well Known Text formatting,
but is not used in the transformation chain.
UnitaryProjection where all angles are in radians.
Note: Serialization of this class is appropriate for short-term storage or RMI use, but may not be compatible with future versions. For long term storage, WKT (Well Know Text) or XML are more appropriate.
| referencing/geotk-referencing (download) | View source code for this class |
| Field Summary | |
|---|---|
double |
azimuth
The azimuth of the central line passing through the centre of the projection, in degrees. |
double |
centralMeridian
Central longitude in degrees. |
double |
falseEasting
False easting, in metres. |
double |
falseNorthing
False northing, in metres. |
double |
latitudeOfOrigin
Latitude of origin in degrees. |
double |
scaleFactor
The scale factor. |
double |
semiMajor
Length of semi-major axis, in metres. |
double |
semiMinor
Length of semi-minor axis, in metres. |
double[] |
standardParallels
The standard parallels, or an empty array if there is none. |
| Constructor Summary | |
|---|---|
UnitaryProjection.Parameters(ParameterDescriptorGroup descriptor,
ParameterValueGroup values)
Creates parameters initialized to values extracted from the given parameter group. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object object)
Compares the given object with the parameters for equality. |
ParameterValueGroup |
getParameterValues()
Returns a group of parameters initialized to the values contained in this object. |
int |
hashCode()
Returns a hash code value for this object. |
void |
validate()
Sets the normalize/denormalize affine transforms to the values contained in this object. |
| Methods inherited from class AbstractMathTransform2D.Parameters |
|---|
createConcatenatedTransform, getParameterDescriptors, normalize, toString |
| Methods inherited from class Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final double semiMajor
MapProjection.SEMI_MAJOR,
UnitaryProjection.excentricitypublic final double semiMinor
MapProjection.SEMI_MINOR,
UnitaryProjection.excentricitypublic double centralMeridian
public double latitudeOfOrigin
public final double[] standardParallels
public double azimuth
public double scaleFactor
public double falseEasting
public double falseNorthing
| Constructor Detail |
|---|
public UnitaryProjection.Parameters(ParameterDescriptorGroup descriptor,
ParameterValueGroup values)
throws ParameterNotFoundException
"semi_major" (mandatory)"semi_minor" (mandatory)"central_meridian" (default to 0°)"latitude_of_origin" (default to 0°)"standard_parallel_1" (default to none)"standard_parallel_2" (default to none)"azimuth" (default to 0°)"scale_factor" (default to 1)"false_easting" (default to 0)"false_northing" (default to 0)
Constructors of UnitaryProjection subclasses must invoke the validate()
method when all parameters (especially the central meridian
and scale factor) are assigned their final value.
descriptor - The descriptor of parameters that are legal for the projection being
constructed. In theory it should be the same than values.descriptors(),
but projection providers should give explicitly the expected descriptors for safety.values - The parameter values in standard units.
ParameterNotFoundException - if a mandatory parameter is missing.| Method Detail |
|---|
public void validate()
throws IllegalArgumentException
UnitaryProjection respectively.
The default implementation defines those affine transforms as if they were performing the following steps, in that order:
Normalize:
Denormalize:
The normalize/denormalize affine are usually identity transforms before this method is invoked. If they were not, the above operations will be concatenated to their current state.
IllegalArgumentException - if a field has an illegal value.public ParameterValueGroup getParameterValues()
getParameterValues in interface ParameterizedgetParameterValues in class AbstractMathTransform2D.ParametersSingleOperation.getParameterValues()public int hashCode()
hashCode in class AbstractMathTransform2D.Parameterspublic boolean equals(Object object)
equals in class AbstractMathTransform2D.Parametersobject - The object to compare with the parameters.
true if the given object is equal to this one.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||