Class EnvelopeReducer

java.lang.Object
org.apache.sis.geometry.EnvelopeReducer

class EnvelopeReducer extends Object
Applies union or intersection operations on a sequence of envelopes. This utility class infers the a common coordinate reference system for performing the reduce operation.
Since:
1.0
Version:
1.0
See Also:
  • Field Details

  • Constructor Details

    • EnvelopeReducer

      EnvelopeReducer(String caller)
      Creates a new reducer. We should have a singleton instance for each type of reduce operation.
  • Method Details

    • reduce

      void reduce(GeneralEnvelope result, org.opengis.geometry.Envelope other)
      Applies the reduce operation on the given result envelope. The result is modified in-place.
    • reduce

      void reduce(DefaultGeographicBoundingBox result, org.opengis.metadata.extent.GeographicBoundingBox other)
      Applies the reduce operation on the given result bounding box. The result is modified in-place.
    • reduce

      final GeneralEnvelope reduce(org.opengis.geometry.Envelope[] envelopes) throws org.opengis.referencing.operation.TransformException
      Reduces all given envelopes, transforming them to a common CRS if necessary. If all envelopes use the same CRS (ignoring metadata) or if the CRS of all envelopes is null, then the reduce operation is performed without transforming any envelope. Otherwise all envelopes are transformed to a common CRS before reduction. The CRS of the returned envelope may different than the CRS of all given envelopes.
      Parameters:
      envelopes - the envelopes for which to perform the reduce operation. Null elements are ignored.
      Returns:
      result of reduce operation, or null if the given array does not contain non-null elements.
      Throws:
      org.opengis.referencing.operation.TransformException - if this method cannot determine a common CRS, or if a transformation failed.