Class EllipsoidalHeightCombiner

java.lang.Object
org.apache.sis.internal.referencing.EllipsoidalHeightCombiner

public final class EllipsoidalHeightCombiner extends Object
A class in charges of combining two-dimensional geographic or projected CRS with an ellipsoidal height into a three-dimensional CRS. This is the converse of EllipsoidalHeightSeparator.
Since:
0.8
Version:
1.0
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The factories to use for creating geodetic objects.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new combiner with no initial factory.
    Creates a new instance initialized to the factories of the given container.
    EllipsoidalHeightCombiner(org.opengis.referencing.crs.CRSFactory crsFactory, org.opengis.referencing.cs.CSFactory csFactory, org.opengis.referencing.operation.CoordinateOperationFactory opFactory)
    Creates a new combiner which will use the given factories.
  • Method Summary

    Modifier and Type
    Method
    Description
    final org.opengis.referencing.crs.CoordinateReferenceSystem
    createCompoundCRS(Map<String,?> properties, org.opengis.referencing.crs.CoordinateReferenceSystem... components)
    Creates a compound CRS, but we special processing for (two-dimensional Geographic + ellipsoidal heights) tuples.
    final org.opengis.referencing.crs.CoordinateReferenceSystem
    createCompoundCRS(org.opengis.referencing.crs.CoordinateReferenceSystem... components)
    Creates a compound CRS using properties inferred from the given components.
    private static org.opengis.referencing.cs.CoordinateSystem
    getCsIfHorizontal2D(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
    Returns the coordinate system if the given CRS is a two-dimensional geographic or projected CRS, or null otherwise.
    (package private) static Map<String,Object>
    properties(org.opengis.referencing.crs.CoordinateReferenceSystem... components)
    Suggests properties for a compound CRS made of the given elements.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • EllipsoidalHeightCombiner

      public EllipsoidalHeightCombiner()
      Creates a new combiner with no initial factory.
    • EllipsoidalHeightCombiner

      public EllipsoidalHeightCombiner(ReferencingFactoryContainer c)
      Creates a new instance initialized to the factories of the given container.
      Parameters:
      c - the container from which to fetch the factories.
    • EllipsoidalHeightCombiner

      public EllipsoidalHeightCombiner(org.opengis.referencing.crs.CRSFactory crsFactory, org.opengis.referencing.cs.CSFactory csFactory, org.opengis.referencing.operation.CoordinateOperationFactory opFactory)
      Creates a new combiner which will use the given factories. Any factory given in argument may be null if lazy instantiation is desired.
      Parameters:
      crsFactory - the factory to use for creating compound or three-dimensional geographic CRS.
      csFactory - the factory to use for creating three-dimensional ellipsoidal CS, if needed.
      opFactory - the factory to use for creating defining conversions, if needed.
  • Method Details

    • createCompoundCRS

      public final org.opengis.referencing.crs.CoordinateReferenceSystem createCompoundCRS(org.opengis.referencing.crs.CoordinateReferenceSystem... components) throws org.opengis.util.FactoryException
      Creates a compound CRS using properties inferred from the given components.
      Parameters:
      components - ordered array of CoordinateReferenceSystem objects.
      Returns:
      the coordinate reference system for the given properties.
      Throws:
      org.opengis.util.FactoryException - if the object creation failed.
    • createCompoundCRS

      public final org.opengis.referencing.crs.CoordinateReferenceSystem createCompoundCRS(Map<String,?> properties, org.opengis.referencing.crs.CoordinateReferenceSystem... components) throws org.opengis.util.FactoryException
      Creates a compound CRS, but we special processing for (two-dimensional Geographic + ellipsoidal heights) tuples. If any such tuple is found, a three-dimensional geographic CRS is created instead of the compound CRS.
      Parameters:
      properties - name and other properties to give to the new object.
      components - ordered array of CoordinateReferenceSystem objects.
      Returns:
      the coordinate reference system for the given properties.
      Throws:
      org.opengis.util.FactoryException - if the object creation failed.
    • getCsIfHorizontal2D

      private static org.opengis.referencing.cs.CoordinateSystem getCsIfHorizontal2D(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
      Returns the coordinate system if the given CRS is a two-dimensional geographic or projected CRS, or null otherwise. The returned coordinate system is either ellipsoidal or Cartesian; no other type is returned.
    • properties

      static Map<String,Object> properties(org.opengis.referencing.crs.CoordinateReferenceSystem... components)
      Suggests properties for a compound CRS made of the given elements. This method builds a default CRS name and domain of validity.
      Parameters:
      components - the components for which to get a default set of properties.
      Returns:
      suggested properties in a modifiable map. Callers can modify the returned map.