public abstract class Geometry extends Object implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
Geometry.GeometryAccelerationDegree
Describes the degree of acceleration of the geometry.
|
static interface |
Geometry.GeometryType
Geometry types
|
static class |
Geometry.Type
The type of this geometry.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
_assignVertexDescriptionImpl(VertexDescription src) |
protected Object |
_getImpl() |
void |
addAttribute(int semantics)
Adds a new attribute to the Geometry.
|
void |
addID()
Adds the ID attribute to this Geometry
|
void |
addM()
Adds the M attribute to this Geometry
|
abstract void |
applyTransformation(Transformation2D transform)
Applies 2D affine transformation in XY plane.
|
void |
assignVertexDescription(VertexDescription src)
Assigns the new VertexDescription by adding or dropping attributes.
|
double |
calculateArea2D()
Calculates the area of the geometry.
|
double |
calculateLength2D()
Calculates the length of the geometry.
|
Geometry |
copy()
Creates a copy of the geometry.
|
abstract void |
copyTo(Geometry dst)
Copies this geometry to another geometry of the same type.
|
abstract Geometry |
createInstance()
Creates an instance of an empty geometry of the same type.
|
void |
dropAllAttributes()
Drops all attributes from the Geometry with exception of POSITON.
|
void |
dropAttribute(int semantics)
Drops an attribute from the Geometry.
|
abstract Geometry |
getBoundary()
Returns boundary of this geometry.
|
VertexDescription |
getDescription()
Returns the VertexDescription of this geomtry.
|
abstract int |
getDimension()
Returns the topological dimension of the geometry object based on the
geometry's type.
|
static int |
getDimensionFromType(int type)
Returns this geometry's dimension.
|
int |
getStateFlag()
The stateFlag value changes with changes applied to this geometry.
|
abstract Geometry.Type |
getType()
Returns the geometry type.
|
boolean |
hasAttribute(int semantics)
A shortcut for getDescription().hasAttribute()
|
boolean |
hasID()
Returns true if this Geometry has an ID attribute
|
boolean |
hasM()
Returns true if this Geometry has an M attribute
|
boolean |
hasZ()
Returns true if this Geometry has the Z attribute
|
static boolean |
isArea(int type)
Indicates if the integer value of the enumeration is an area (dimension
2).
|
abstract boolean |
isEmpty()
IsEmpty returns TRUE when the Geometry object does not contain geometric
information beyond its original initialization state.
|
static boolean |
isLinear(int type)
Indicates if the integer value of the enumeration is linear (dimension
1).
|
static boolean |
isMultiPath(int type)
Indicates if the integer value of the enumeration is a multipath (ie,
line or area).
|
static boolean |
isMultiVertex(int type)
Indicates if the integer value of the enumeration is a multivertex (ie,
multipoint, line, or area).
|
static boolean |
isPoint(int type)
Indicates if the integer value of the enumeration is a point type
(dimension 0).
|
static boolean |
isSegment(int type)
Indicates if the integer value of the enumeration is a segment.
|
void |
mergeVertexDescription(VertexDescription src)
Merges the new VertexDescription by adding missing attributes from the
src.
|
abstract void |
queryEnvelope(Envelope env)
Returns the axis aligned bounding box of the geometry.
|
abstract void |
queryEnvelope2D(Envelope2D env)
Returns tight bbox of the Geometry in X, Y plane.
|
abstract Envelope1D |
queryInterval(int semantics,
int ordinate)
Returns the min and max attribute values at the ordinate of the Geometry
|
void |
queryLooseEnvelope2D(Envelope2D env)
Returns the conservative bbox of the Geometry in X, Y plane.
|
abstract void |
replaceNaNs(int semantics,
double value)
Replaces NaNs in the attribute with the given value.
|
abstract void |
setEmpty()
Returns the geometry to its original initialization state by releasing
all data referenced by the geometry.
|
String |
toString()
The output of this method can be only used for debugging.
|
static int |
vertex_count(Geometry geom)
Returns count of geometry vertices:
1 for Point, 4 for Envelope, get_point_count for MultiVertexGeometry types,
2 for segment types
Returns 0 if geometry is empty.
|
public abstract Geometry.Type getType()
public abstract int getDimension()
Returns 0 for point and multipoint.
Returns 1 for lines and polylines.
Returns 2 for polygons and envelopes
Returns 3 for objects with volume
public VertexDescription getDescription()
public void assignVertexDescription(VertexDescription src)
protected abstract void _assignVertexDescriptionImpl(VertexDescription src)
public void mergeVertexDescription(VertexDescription src)
public boolean hasAttribute(int semantics)
public void addAttribute(int semantics)
semantics - public void dropAttribute(int semantics)
public void dropAllAttributes()
public abstract Envelope1D queryInterval(int semantics, int ordinate)
public abstract void queryEnvelope(Envelope env)
env - The envelope to return the result in.public abstract void queryEnvelope2D(Envelope2D env)
public void queryLooseEnvelope2D(Envelope2D env)
public abstract boolean isEmpty()
public abstract void setEmpty()
public abstract void applyTransformation(Transformation2D transform)
transform - The affine transformation to be applied to this geometry.public abstract Geometry createInstance()
public abstract void copyTo(Geometry dst)
GeometryException - invalid_argument if the geometry is of different type.public double calculateArea2D()
public double calculateLength2D()
GeometryEngineprotected Object _getImpl()
public boolean hasZ()
public void addM()
public boolean hasM()
public void addID()
public boolean hasID()
public static int getDimensionFromType(int type)
Returns 0 for point and multipoint.
Returns 1 for lines and polylines.
Returns 2 for polygons and envelopes
Returns 3 for objects with volume
type - The integer value from geometry enumeration. You can use the
method Geometry.Type.value() to get at the integer value.public static boolean isPoint(int type)
type - The integer value from geometry enumeration. You can use the
method Geometry.Type.value() to get at the integer value.public static boolean isLinear(int type)
type - The integer value from geometry enumeration. You can use the
method Geometry.Type.value() to get at the integer value.public static boolean isArea(int type)
type - The integer value from geometry enumeration. You can use the
method Geometry.Type.value() to get at the integer value.public static boolean isSegment(int type)
type - The integer value from geometry enumeration. You can use the
method Geometry.Type.value() to get at the integer value.public static boolean isMultiVertex(int type)
type - The integer value from geometry enumeration. You can use the
method Geometry.Type.value() to get at the integer value.public static boolean isMultiPath(int type)
type - The integer value from geometry enumeration. You can use the
method Geometry.Type.value() to get at the integer value.public Geometry copy()
public abstract Geometry getBoundary()
public abstract void replaceNaNs(int semantics,
double value)
public int getStateFlag()
public String toString()
public static int vertex_count(Geometry geom)
Copyright © 2017. All Rights Reserved.