Class GeometryUtils.EnvelopeTarget

  • Enclosing class:
    GeometryUtils

    public static final class GeometryUtils.EnvelopeTarget
    extends GeometryUtils.Target
    Converter output target that calculates an envelope.
    • Field Detail

      • enabled

        private boolean enabled
        Enables or disables the envelope calculation. Inner rings of polygons are not counted.
      • set

        private boolean set
        Whether envelope was set.
      • minX

        private double minX
      • maxX

        private double maxX
      • minY

        private double minY
      • maxY

        private double maxY
    • Constructor Detail

      • EnvelopeTarget

        public EnvelopeTarget()
        Creates a new envelope calculation target.
    • Method Detail

      • startPolygon

        protected void startPolygon​(int numInner,
                                    int numPoints)
        Description copied from class: GeometryUtils.Target
        Invoked before writing a POLYGON. If polygon is empty, both parameters are 0.
        Overrides:
        startPolygon in class GeometryUtils.Target
        Parameters:
        numInner - number of inner polygons
        numPoints - number of points in outer polygon
      • startPolygonInner

        protected void startPolygonInner​(int numInner)
        Description copied from class: GeometryUtils.Target
        Invoked before writing an inner polygon in POLYGON.
        Overrides:
        startPolygonInner in class GeometryUtils.Target
        Parameters:
        numInner - number of points in inner polygon
      • addCoordinate

        protected void addCoordinate​(double x,
                                     double y,
                                     double z,
                                     double m,
                                     int index,
                                     int total)
        Description copied from class: GeometryUtils.Target
        Invoked to add a coordinate to a geometry.
        Specified by:
        addCoordinate in class GeometryUtils.Target
        Parameters:
        x - X coordinate
        y - Y coordinate
        z - Z coordinate (NaN if not used)
        m - M coordinate (NaN if not used)
        index - 0-based index of coordinate in the current sequence
        total - total number of coordinates in the current sequence
      • getEnvelope

        public double[] getEnvelope()
        Returns the envelope.
        Returns:
        the envelope, or null