org.h2.util.geometry

## Class GeometryUtils.EnvelopeAndDimensionSystemTarget

- java.lang.Object
- - org.h2.util.geometry.GeometryUtils.Target
  - - org.h2.util.geometry.GeometryUtils.EnvelopeAndDimensionSystemTarget

Enclosing class:
  GeometryUtils

    public static final class GeometryUtils.EnvelopeAndDimensionSystemTarget
    extends GeometryUtils.Target

Converter output target that calculates an envelope and determines the minimal dimension system.

### Constructor Summary

Constructors
Constructor and Description
`EnvelopeAndDimensionSystemTarget()` Creates a new envelope and dimension system calculation target.

### Method Summary

All Methods Instance Methods Concrete Methods
`protected void` `addCoordinate(double x, double y, double z, double m, int index, int total)` Invoked to add a coordinate to a geometry.
`protected void` `dimensionSystem(int dimensionSystem)` Invoked to add dimension system requirement.
`int` `getDimensionSystem()` Returns the minimal dimension system.
`double[]` `getEnvelope()` Returns the envelope.
`protected void` `startLineString(int numPoints)` Invoked before writing a LINESTRING.
`protected void` `startPoint()` Invoked before writing a POINT.
`protected void` `startPolygon(int numInner, int numPoints)` Invoked before writing a POLYGON.
`protected void` `startPolygonInner(int numInner)` Invoked before writing an inner polygon in POLYGON.

### Methods inherited from class org.h2.util.geometry.GeometryUtils.Target

`endCollectionItem, endNonEmptyPolygon, endObject, init, startCollection, startCollectionItem`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### EnvelopeAndDimensionSystemTarget

    public EnvelopeAndDimensionSystemTarget()

Creates a new envelope and dimension system calculation target.

### Method Detail

#### dimensionSystem

    protected void dimensionSystem(int dimensionSystem)

Description copied from class: `GeometryUtils.Target`
Invoked to add dimension system requirement.

Overrides:
  `dimensionSystem` in class `GeometryUtils.Target`
Parameters:
  `dimensionSystem` - dimension system

#### startPoint

    protected void startPoint()

Description copied from class: `GeometryUtils.Target`
Invoked before writing a POINT.

Overrides:
  `startPoint` in class `GeometryUtils.Target`

#### startLineString

    protected void startLineString(int numPoints)

Description copied from class: `GeometryUtils.Target`
Invoked before writing a LINESTRING.

Overrides:
  `startLineString` in class `GeometryUtils.Target`
Parameters:
  `numPoints` - number of points in line string

#### 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

#### getDimensionSystem

    public int getDimensionSystem()

Returns the minimal dimension system.

Returns:
  the minimal dimension system