public class DefaultComplex extends AbstractGeometry implements Complex
Geometry.DIMENSIONS, Geometry.OPERATIONS, Geometry.SUBTYPES, Geometry.TYPES, Geometry.ValidationStatus
LOGGER
BEST, E, EXTENDED_GEOMSUBTYPE_OFFSET, EXTENDED_GEOMTYPE_OFFSET, JOIN_STYLE_BEVEL, JOIN_STYLE_MITRE, JOIN_STYLE_ROUND, N, NE, NW, S, SE, SELECTHANDLER, STRETCHINGHANDLER, SW, W
Constructor and Description |
---|
DefaultComplex(GeometryType geomType) |
DefaultComplex(int subtype) |
Modifier and Type | Method and Description |
---|---|
void |
addPrimitive(Primitive primitive)
Adds a new primitive to the primitive
|
void |
addPrimitives(Aggregate aggregate) |
void |
addPrimitives(Geometry geometry) |
boolean |
canBeReprojected(ICoordTrans ct)
Return true if the geometry can be reprojected by the coordinate
transformation
|
boolean |
canBeTransformed(java.awt.geom.AffineTransform at)
Return true if the geometry can be transformed by the affine transform
|
Geometry |
cloneGeometry()
Creates a clone of this geometry.
|
Aggregate |
createAggregate(int type,
java.util.function.Predicate<Geometry> filter) |
void |
ensureCapacity(int capacity) |
boolean |
equals(java.lang.Object obj) |
void |
flip()
Flip the coordinates of the geometry.
|
Geometry |
force2D() |
Geometry |
force2DM() |
Geometry |
force3D() |
Geometry |
force3DM() |
Geometry |
get(int position) |
int |
getDimension()
Returns the largest number n such that each direct position in a
geometric set can be associated with a subset that has the direct
position in its interior and is similar (isomorphic) to Rn, Euclidean
n-space.
|
java.util.Collection<? extends Geometry> |
getElements() |
GeneralPathX |
getGeneralPath()
Get GeneralPathIterator, to do registered operations to it.
|
Handler[] |
getHandlers(int type)
It returns the handlers of the geometry, these they can be of two types
is straightening and of selection.
|
com.vividsolutions.jts.geom.Geometry |
getJTS() |
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform affineTransform)
If applies an affine transformation and returns the GeneralPathXIterator
with this geometry's information.
|
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform at,
double flatness)
If applies an affine transformation and returns the GeneralPathXIterator
with this geometry's information.
|
Primitive |
getPrimitiveAt(int i)
Returns one of the
Primitive 's that is in a concrete position. |
int |
getPrimitivesNumber()
Returns the number of
Primitive 's that composes this multi
geometry. |
java.awt.Shape |
getShape() |
java.awt.Shape |
getShape(java.awt.geom.AffineTransform affineTransform) |
int |
hashCode() |
boolean |
is3D() |
boolean |
isEmpty() |
java.util.Iterator<Geometry> |
iterator() |
java.util.Iterator<Geometry> |
iterator(java.util.function.Predicate<Geometry> filter) |
Geometry |
offset(double distance) |
Geometry |
offset(int joinStyle,
double distance) |
void |
reProject(ICoordTrans ct)
Reprojects this geometry by the coordinate transformer passed as
parameter.
|
int |
size() |
MultiLine |
toLines()
Converts the geometry to be lines and makes with them a multiLine
|
MultiPoint |
toPoints()
Converts the geometry to be points and makes with them a multiPoint
|
MultiPolygon |
toPolygons()
Converts the geometry to be polygons and makes with them a multiPolygon
|
void |
transform(java.awt.geom.AffineTransform at)
It applies an affine transformation to the geometry.
|
area, boundary, buffer, buffer, centroid, clone, closestPoints, compareTo, contains, contains, contains, contains, contains, convertTo, convertToEWKB, convertToEWKB, convertToEWKBForcingType, convertToGeoJson, convertToGeoJson, convertToHexEWKB, convertToHexEWKBQuietly, convertToHexWKB, convertToHexWKBQuietly, convertToWKB, convertToWKB, convertToWKBForcingType, convertToWKBQuietly, convertToWKT, convertToWKTQuietly, convexHull, coveredBy, covers, crosses, difference, disjoint, distance, ensureOrientation, fastIntersects, fix, forceSubtype, getBounds, getBounds2D, getEnvelope, getGeometryType, getInteriorPoint, getInternalShape, getManager, getProjection, getType, getValidationStatus, intersection, intersects, intersects, intersects, invokeOperation, invokeOperation, isCCW, isSimple, isValid, isWithinDistance, makeValid, move, notifyDeprecated, out, overlaps, perimeter, rotate, scale, setGeometryType, setProjection, setProjection, setProjectionIffNull, snapTo, toString, touches, union, within
finalize, getClass, notify, notifyAll, wait, wait, wait
area, boundary, buffer, buffer, centroid, clone, closestPoints, contains, convertTo, convertToEWKB, convertToEWKB, convertToEWKBForcingType, convertToGeoJson, convertToHexEWKB, convertToHexEWKBQuietly, convertToHexWKB, convertToHexWKBQuietly, convertToWKB, convertToWKB, convertToWKBForcingType, convertToWKBQuietly, convertToWKT, convertToWKTQuietly, convexHull, coveredBy, covers, crosses, difference, disjoint, distance, ensureOrientation, fastIntersects, fix, forceSubtype, getBounds2D, getEnvelope, getGeometryType, getInteriorPoint, getInternalShape, getProjection, getType, getValidationStatus, intersection, intersects, intersects, invokeOperation, invokeOperation, isCCW, isSimple, isValid, isWithinDistance, makeValid, move, out, overlaps, perimeter, rotate, scale, setProjection, setProjection, setProjectionIffNull, snapTo, touches, union, within
contains, contains, contains, contains, getBounds, intersects
isEmpty, isEmpty, isEmptyQuietly
public DefaultComplex(GeometryType geomType)
public DefaultComplex(int subtype)
subtype
- public int getPrimitivesNumber()
Complex
Primitive
's that composes this multi
geometry.getPrimitivesNumber
in interface Complex
Primitive
's that composes this multi
geometry.public Primitive getPrimitiveAt(int i)
Complex
Primitive
's that is in a concrete position.getPrimitiveAt
in interface Complex
i
- Geometry position.public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform affineTransform)
Geometry
getPathIterator
in interface java.awt.Shape
getPathIterator
in interface Geometry
affineTransform
- The transformation to apply.public java.util.Iterator<Geometry> iterator()
iterator
in interface java.lang.Iterable<Geometry>
public void ensureCapacity(int capacity)
ensureCapacity
in interface Complex
public void reProject(ICoordTrans ct)
Geometry
public void transform(java.awt.geom.AffineTransform at)
Geometry
public boolean is3D()
is3D
in interface GeometryJTS
public java.awt.Shape getShape(java.awt.geom.AffineTransform affineTransform)
public java.awt.Shape getShape()
public boolean equals(java.lang.Object obj)
equals
in interface Geometry
equals
in class AbstractGeometry
public int hashCode()
hashCode
in class java.lang.Object
public boolean canBeTransformed(java.awt.geom.AffineTransform at)
Geometry
canBeTransformed
in interface Geometry
at
- the affine transformpublic boolean canBeReprojected(ICoordTrans ct)
Geometry
canBeReprojected
in interface Geometry
ct
- the coordinate transformationpublic void flip() throws GeometryOperationNotSupportedException, GeometryOperationException
Geometry
flip
in interface Geometry
GeometryOperationNotSupportedException
GeometryOperationException
public void addPrimitive(Primitive primitive)
Complex
addPrimitive
in interface Complex
primitive
- The primitive to addpublic void addPrimitives(Aggregate aggregate)
addPrimitives
in interface Complex
public void addPrimitives(Geometry geometry)
addPrimitives
in interface Complex
public Geometry force2D() throws GeometryOperationNotSupportedException, GeometryOperationException
force2D
in interface Geometry
GeometryOperationNotSupportedException
GeometryOperationException
public Geometry force2DM() throws GeometryOperationNotSupportedException, GeometryOperationException
force2DM
in class AbstractGeometry
GeometryOperationNotSupportedException
GeometryOperationException
public Geometry force3D() throws GeometryOperationNotSupportedException, GeometryOperationException
force3D
in class AbstractGeometry
GeometryOperationNotSupportedException
GeometryOperationException
public Geometry force3DM() throws GeometryOperationNotSupportedException, GeometryOperationException
force3DM
in class AbstractGeometry
GeometryOperationNotSupportedException
GeometryOperationException
public Geometry offset(double distance) throws GeometryOperationNotSupportedException, GeometryOperationException
offset
in interface Geometry
GeometryOperationNotSupportedException
GeometryOperationException
public Geometry offset(int joinStyle, double distance) throws GeometryOperationNotSupportedException, GeometryOperationException
offset
in interface Geometry
GeometryOperationNotSupportedException
GeometryOperationException
public com.vividsolutions.jts.geom.Geometry getJTS()
getJTS
in interface GeometryJTS
public Geometry cloneGeometry()
Geometry
cloneGeometry
in interface Geometry
public int getDimension()
Geometry
getDimension
in interface Geometry
public Handler[] getHandlers(int type)
Geometry
getHandlers
in interface Geometry
type
- Type of handlers.public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at, double flatness)
Geometry
getPathIterator
in interface java.awt.Shape
getPathIterator
in interface Geometry
at
- The affine transformation.public GeneralPathX getGeneralPath()
Geometry
getGeneralPath
in interface Geometry
public MultiPoint toPoints() throws GeometryException
Geometry
toPoints
in interface Geometry
GeometryException
public MultiLine toLines() throws GeometryException
Geometry
toLines
in interface Geometry
GeometryException
public MultiPolygon toPolygons() throws GeometryException
Geometry
toPolygons
in interface Geometry
GeometryException
public java.util.Collection<? extends Geometry> getElements()
getElements
in interface Complex
public java.util.Iterator<Geometry> iterator(java.util.function.Predicate<Geometry> filter)
public Aggregate createAggregate(int type, java.util.function.Predicate<Geometry> filter) throws CreateGeometryException
createAggregate
in interface Complex
CreateGeometryException
public boolean isEmpty()