Package org.h2.util.geometry
Class GeometryUtils.EnvelopeTarget
java.lang.Object
org.h2.util.geometry.GeometryUtils.Target
org.h2.util.geometry.GeometryUtils.EnvelopeTarget
- Enclosing class:
GeometryUtils
Converter output target that calculates an envelope.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddCoordinate(double x, double y, double z, double m, int index, int total) Invoked to add a coordinate to a geometry.double[]Returns the envelope.protected voidstartLineString(int numPoints) Invoked before writing a LINESTRING.protected voidInvoked before writing a POINT.protected voidstartPolygon(int numInner, int numPoints) Invoked before writing a POLYGON.protected voidstartPolygonInner(int numInner) Invoked before writing an inner polygon in POLYGON.Methods inherited from class org.h2.util.geometry.GeometryUtils.Target
dimensionSystem, endCollectionItem, endNonEmptyPolygon, endObject, init, startCollection, startCollectionItem
-
Constructor Details
-
EnvelopeTarget
public EnvelopeTarget()Creates a new envelope calculation target.
-
-
Method Details
-
startPoint
protected void startPoint()Description copied from class:GeometryUtils.TargetInvoked before writing a POINT.- Overrides:
startPointin classGeometryUtils.Target
-
startLineString
protected void startLineString(int numPoints) Description copied from class:GeometryUtils.TargetInvoked before writing a LINESTRING.- Overrides:
startLineStringin classGeometryUtils.Target- Parameters:
numPoints- number of points in line string
-
startPolygon
protected void startPolygon(int numInner, int numPoints) Description copied from class:GeometryUtils.TargetInvoked before writing a POLYGON. If polygon is empty, both parameters are 0.- Overrides:
startPolygonin classGeometryUtils.Target- Parameters:
numInner- number of inner polygonsnumPoints- number of points in outer polygon
-
startPolygonInner
protected void startPolygonInner(int numInner) Description copied from class:GeometryUtils.TargetInvoked before writing an inner polygon in POLYGON.- Overrides:
startPolygonInnerin classGeometryUtils.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.TargetInvoked to add a coordinate to a geometry.- Specified by:
addCoordinatein classGeometryUtils.Target- Parameters:
x- X coordinatey- Y coordinatez- Z coordinate (NaN if not used)m- M coordinate (NaN if not used)index- 0-based index of coordinate in the current sequencetotal- total number of coordinates in the current sequence
-
getEnvelope
public double[] getEnvelope()Returns the envelope.- Returns:
- the envelope, or null
-