Package org.apache.sis.parameter
Class MapProjectionDescriptor
java.lang.Object
org.apache.sis.io.wkt.FormattableObject
org.apache.sis.referencing.AbstractIdentifiedObject
org.apache.sis.parameter.AbstractParameterDescriptor
org.apache.sis.parameter.DefaultParameterDescriptorGroup
org.apache.sis.parameter.MapProjectionDescriptor
- All Implemented Interfaces:
Serializable
,Formattable
,Deprecable
,LenientComparable
,org.opengis.parameter.GeneralParameterDescriptor
,org.opengis.parameter.ParameterDescriptorGroup
,org.opengis.referencing.IdentifiedObject
Map projection parameters, with special processing for alternative ways to express the ellipsoid axis length
and the standard parallels. Those alternative ways are non-standard; when a value is set to such alternative
parameter, the value is translated to standard parameter values as soon as possible.
The non-standard parameters are:
"earth_radius"
and"inverse_flattening"
, which are mapped to the"semi_major"
and"semi_minor"
parameters."standard_parallel"
with an array value of 1 or 2 elements, which is mapped to"standard_parallel_1"
and"standard_parallel_2"
- Since:
- 0.6
- Version:
- 0.6
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final boolean
true
if the "standard_parallel" parameter can be added.private static final long
For cross-version compatibility.Fields inherited from class org.apache.sis.referencing.AbstractIdentifiedObject
DEPRECATED_KEY, LOCALE_KEY
Fields inherited from interface org.opengis.referencing.IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
-
Constructor Summary
ConstructorsConstructorDescriptionMapProjectionDescriptor
(Map<String, ?> properties, org.opengis.parameter.ParameterDescriptor<?>[] parameters) Creates a new parameter descriptor from the given properties and parameters. -
Method Summary
Modifier and TypeMethodDescriptionprivate static org.opengis.parameter.ParameterDescriptor<?>[]
addAxisLengths
(org.opengis.parameter.ParameterDescriptor<?>[] parameters) Work around for RFE #4093999 in Sun's bug database ("Relax constraint on placement of this()/super() call in constructors").org.opengis.parameter.ParameterValueGroup
Returns the parameter group implementation which can handle the dynamic parameters.org.opengis.parameter.GeneralParameterDescriptor
descriptor
(String name) Returns the parameter descriptor for the given name.(package private) static boolean
isHeuristicMatchForName
(String n1, String n2) Returnstrue
if the given parameter names should be considered equals.Methods inherited from class org.apache.sis.parameter.DefaultParameterDescriptorGroup
castOrCopy, computeHashCode, descriptors, equals, getInterface, merge
Methods inherited from class org.apache.sis.parameter.AbstractParameterDescriptor
formatTo, getMaximumOccurs, getMinimumOccurs, print, toString
Methods inherited from class org.apache.sis.referencing.AbstractIdentifiedObject
castOrCopy, equals, formatTo, getAlias, getDescription, getIdentifiers, getName, getRemarks, hashCode, isDeprecated, isHeuristicMatchForName
Methods inherited from class org.apache.sis.io.wkt.FormattableObject
toString, toWKT
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opengis.parameter.GeneralParameterDescriptor
getMaximumOccurs, getMinimumOccurs
Methods inherited from interface org.opengis.referencing.IdentifiedObject
getAlias, getIdentifiers, getName, getRemarks, toWKT
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor cross-version compatibility.- See Also:
-
hasStandardParallels
final boolean hasStandardParallelstrue
if the "standard_parallel" parameter can be added.
-
-
Constructor Details
-
MapProjectionDescriptor
MapProjectionDescriptor(Map<String, ?> properties, org.opengis.parameter.ParameterDescriptor<?>[] parameters) Creates a new parameter descriptor from the given properties and parameters.- Parameters:
properties
- names, aliases and identifiers of the parameter group.parameters
- the "real" parameters.
-
-
Method Details
-
addAxisLengths
@Workaround(library="JDK", version="1.7") private static org.opengis.parameter.ParameterDescriptor<?>[] addAxisLengths(org.opengis.parameter.ParameterDescriptor<?>[] parameters) Work around for RFE #4093999 in Sun's bug database ("Relax constraint on placement of this()/super() call in constructors"). -
isHeuristicMatchForName
Returnstrue
if the given parameter names should be considered equals. The algorithm used here shall be basically the same than the one used (indirectly) byDefaultParameterDescriptorGroup.descriptor(String)
.- See Also:
-
descriptor
public org.opengis.parameter.GeneralParameterDescriptor descriptor(String name) throws org.opengis.parameter.ParameterNotFoundException Returns the parameter descriptor for the given name. If the given name is one of the dynamic parameters, returns a descriptor for that parameter without adding it to the list of parameter values.- Specified by:
descriptor
in interfaceorg.opengis.parameter.ParameterDescriptorGroup
- Overrides:
descriptor
in classDefaultParameterDescriptorGroup
- Parameters:
name
- the case insensitive name of the parameter to search for.- Returns:
- the parameter for the given name.
- Throws:
org.opengis.parameter.ParameterNotFoundException
- if there is no parameter for the given name.
-
createValue
public org.opengis.parameter.ParameterValueGroup createValue()Returns the parameter group implementation which can handle the dynamic parameters.- Specified by:
createValue
in interfaceorg.opengis.parameter.GeneralParameterDescriptor
- Specified by:
createValue
in interfaceorg.opengis.parameter.ParameterDescriptorGroup
- Overrides:
createValue
in classDefaultParameterDescriptorGroup
- Returns:
- a new parameter instance initialized to the default value.
-