Class CompositeGeographicTransformation

  • All Implemented Interfaces:
    Serializable

    public abstract class CompositeGeographicTransformation
    extends DatumTransformation
    implements Serializable
    The CompositeGeographicTransformation contains one or more geographic transformations. Sometimes it is necessary to transform between two geographic coordinate systems where a direct transformation does not exist. A composite geotransformation allows you to create a 'chain' of existing or custom transformations. Each transformation in the set must have its direction set properly.
    See Also:
    Serialized Form
    • Constructor Detail

      • CompositeGeographicTransformation

        public CompositeGeographicTransformation()
    • Method Detail

      • create

        public static CompositeGeographicTransformation create()
        Creates a CompositeGeographicTransformation instance that is empty. To use the new CompositeGeographicTransformation you need to populated it using the Add method.
        Returns:
        Returns an empty CompositeGeographicTransformation.
      • create

        public static CompositeGeographicTransformation create​(int wkid,
                                                               boolean inverted)
        Creates CompositeGeographicTransformation instance that consist of a single GeographicTransformation with the given well known ID. Geographic transformations associated with wkids have a specific direction. If a transformation is from NAD_1927 to WGS84 and you want your geographic transformation to go from NAD_1927 to WGS84 then the inverted boolean should be set to false, but if you want to go from WGS84 to NAD_1927, then the inverted boolean should be set to true.
        Parameters:
        wkid - The wkid of a geographic transformation.
        inverted - Whether the geographic transformation should be applied forward or reverse.
        Returns:
        CompositeGeographicTransformation consisting of one GeographicTransformation.
      • create

        public static CompositeGeographicTransformation create​(String wkt,
                                                               boolean inverted)
        Creates CompositeGeographicTransformation instance that consist of a single GeographicTransformation with the given well known text. Geographic transformations have a specific direction. If a transformation is defined as being from NAD_1927 to WGS84 and you want your geographic transformation to go from NAD_1927 to WGS84 then the inverted boolean should be set to false, but if you want to go from WGS84 to NAD_1927 using said transformation, then the inverted boolean should be set to true.
        Parameters:
        wkt - The well-known text string representing a geographic transformation from one geographic coordinate system (GCS) to another.
        inverted - Whether the geographic transformation should be applied forward or reverse.
        Returns:
        CompositeGeographicTransformation consisting of one GeographicTransformation.
      • getName

        public abstract String getName()
        Returns the name of the composite transformation. The name is created by appending the names of the underlying geographic transformations, separated with '+' sign. Inverted transformations have tildas '~' prepended to their names.
        Specified by:
        getName in class DatumTransformation
        Returns:
        The name of the composite transformation
      • getInputSpatialReference

        public abstract SpatialReference getInputSpatialReference()
        Returns the input spatial reference.
      • getOutputSpatialReference

        public abstract SpatialReference getOutputSpatialReference()
        Returns the output spatial reference.
      • nameIsSet

        public abstract boolean nameIsSet()
        Returns true when the value of getName() is set by the user that constructed the transformation. Returns false, when the name is a derived one.
      • getStep

        public abstract GeographicTransformation getStep​(int index)
        A geographic transformation from the list.
        Parameters:
        index - The index of the GeographicTransformation.
        Returns:
        GeographicTransformation
      • getInverse

        public abstract CompositeGeographicTransformation getInverse()
        Produces an inverse of the CompositeGeographicTransformation.
        Returns:
        CompositeGeographicTransformation
      • queryGTList

        public static List<CompositeGeographicTransformation> queryGTList​(SpatialReference srSrc,
                                                                          SpatialReference srDst,
                                                                          Envelope2D extent_of_interest,
                                                                          int max_entries,
                                                                          boolean skip_unusable_entries)
        Returns a list of available geographic transformations that can be used to convert between given spatial references. The transformations can be used to construct the Projection_transformation instance.
        Parameters:
        srSrc - The spatial reference to transform from.
        srDst - The spatial reference to transform to.
        extent_of_interest - The extent of the interest for the projected data. The envelope is given in the coordinates of srSrc. Pass empty envelope, or null, when the extent is not known. This is taken into account when the spatial references are sorted.
        max_entries - The maximum number of entries in the output array. Pass 0 if all entries have to be returned.
        skip_unusable_entries - If skip_unuseable_entries is true, the returned list will not contain any transformations for which references_missing_data is true, otherwise it would return all transformations including those with missing data files.
        Returns:
        The geographic transformations sorted by accuracy (higher accuracy first), and by the area of interest (the transformations that do not cover the extent of interest are sorted by the coverage area, those with larger area placed first). The transformations with unknown accuracy will be placed on top of the list. The method produces one or two step transformations only. Note: The result of the method can change between releases due to newly added geographic transformations, or algorithm improvements.