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 booleantrueif the "standard_parallel" parameter can be added.private static final longFor cross-version compatibility.Fields inherited from class org.apache.sis.referencing.AbstractIdentifiedObject
DEPRECATED_KEY, LOCALE_KEYFields 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.ParameterValueGroupReturns the parameter group implementation which can handle the dynamic parameters.org.opengis.parameter.GeneralParameterDescriptordescriptor(String name) Returns the parameter descriptor for the given name.(package private) static booleanisHeuristicMatchForName(String n1, String n2) Returnstrueif the given parameter names should be considered equals.Methods inherited from class org.apache.sis.parameter.DefaultParameterDescriptorGroup
castOrCopy, computeHashCode, descriptors, equals, getInterface, mergeMethods inherited from class org.apache.sis.parameter.AbstractParameterDescriptor
formatTo, getMaximumOccurs, getMinimumOccurs, print, toStringMethods inherited from class org.apache.sis.referencing.AbstractIdentifiedObject
castOrCopy, equals, formatTo, getAlias, getDescription, getIdentifiers, getName, getRemarks, hashCode, isDeprecated, isHeuristicMatchForNameMethods inherited from class org.apache.sis.io.wkt.FormattableObject
toString, toWKTMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opengis.parameter.GeneralParameterDescriptor
getMaximumOccurs, getMinimumOccursMethods 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 hasStandardParallelstrueif 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
Returnstrueif 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). -
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:
descriptorin interfaceorg.opengis.parameter.ParameterDescriptorGroup- Overrides:
descriptorin 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:
createValuein interfaceorg.opengis.parameter.GeneralParameterDescriptor- Specified by:
createValuein interfaceorg.opengis.parameter.ParameterDescriptorGroup- Overrides:
createValuein classDefaultParameterDescriptorGroup- Returns:
- a new parameter instance initialized to the default value.
-