Class MapProjectionDescriptor

All Implemented Interfaces:
Serializable, Formattable, Deprecable, LenientComparable, org.opengis.parameter.GeneralParameterDescriptor, org.opengis.parameter.ParameterDescriptorGroup, org.opengis.referencing.IdentifiedObject

final class MapProjectionDescriptor extends DefaultParameterDescriptorGroup
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"
The main purpose of this class is to support transparently the netCDF ways to express some parameter values.
Since:
0.6
Version:
0.6
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      For cross-version compatibility.
      See Also:
    • hasStandardParallels

      final boolean hasStandardParallels
      true 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

      static boolean isHeuristicMatchForName(String n1, String n2)
      Returns true if the given parameter names should be considered equals. The algorithm used here shall be basically the same than the one used (indirectly) by DefaultParameterDescriptorGroup.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 interface org.opengis.parameter.ParameterDescriptorGroup
      Overrides:
      descriptor in class DefaultParameterDescriptorGroup
      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 interface org.opengis.parameter.GeneralParameterDescriptor
      Specified by:
      createValue in interface org.opengis.parameter.ParameterDescriptorGroup
      Overrides:
      createValue in class DefaultParameterDescriptorGroup
      Returns:
      a new parameter instance initialized to the default value.