public class DefaultComplex extends AbstractGeometry implements Complex
Geometry.DIMENSIONS, Geometry.OPERATIONS, Geometry.SUBTYPES, Geometry.TYPES, Geometry.ValidationStatusLOGGERBEST, 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, withinfinalize, getClass, notify, notifyAll, wait, wait, waitarea, 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, withincontains, contains, contains, contains, getBounds, intersectsisEmpty, isEmpty, isEmptyQuietlypublic DefaultComplex(GeometryType geomType)
public DefaultComplex(int subtype)
subtype - public int getPrimitivesNumber()
ComplexPrimitive's that composes this multi
geometry.getPrimitivesNumber in interface ComplexPrimitive's that composes this multi
geometry.public Primitive getPrimitiveAt(int i)
ComplexPrimitive's that is in a concrete position.getPrimitiveAt in interface Complexi - Geometry position.public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform affineTransform)
GeometrygetPathIterator in interface java.awt.ShapegetPathIterator in interface GeometryaffineTransform - 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 Complexpublic void reProject(ICoordTrans ct)
Geometrypublic void transform(java.awt.geom.AffineTransform at)
Geometrypublic boolean is3D()
is3D in interface GeometryJTSpublic java.awt.Shape getShape(java.awt.geom.AffineTransform affineTransform)
public java.awt.Shape getShape()
public boolean equals(java.lang.Object obj)
equals in interface Geometryequals in class AbstractGeometrypublic int hashCode()
hashCode in class java.lang.Objectpublic boolean canBeTransformed(java.awt.geom.AffineTransform at)
GeometrycanBeTransformed in interface Geometryat - the affine transformpublic boolean canBeReprojected(ICoordTrans ct)
GeometrycanBeReprojected in interface Geometryct - the coordinate transformationpublic void flip()
throws GeometryOperationNotSupportedException,
GeometryOperationException
Geometryflip in interface GeometryGeometryOperationNotSupportedExceptionGeometryOperationExceptionpublic void addPrimitive(Primitive primitive)
ComplexaddPrimitive in interface Complexprimitive - The primitive to addpublic void addPrimitives(Aggregate aggregate)
addPrimitives in interface Complexpublic void addPrimitives(Geometry geometry)
addPrimitives in interface Complexpublic Geometry force2D() throws GeometryOperationNotSupportedException, GeometryOperationException
force2D in interface GeometryGeometryOperationNotSupportedExceptionGeometryOperationExceptionpublic Geometry force2DM() throws GeometryOperationNotSupportedException, GeometryOperationException
force2DM in class AbstractGeometryGeometryOperationNotSupportedExceptionGeometryOperationExceptionpublic Geometry force3D() throws GeometryOperationNotSupportedException, GeometryOperationException
force3D in class AbstractGeometryGeometryOperationNotSupportedExceptionGeometryOperationExceptionpublic Geometry force3DM() throws GeometryOperationNotSupportedException, GeometryOperationException
force3DM in class AbstractGeometryGeometryOperationNotSupportedExceptionGeometryOperationExceptionpublic Geometry offset(double distance) throws GeometryOperationNotSupportedException, GeometryOperationException
offset in interface GeometryGeometryOperationNotSupportedExceptionGeometryOperationExceptionpublic Geometry offset(int joinStyle, double distance) throws GeometryOperationNotSupportedException, GeometryOperationException
offset in interface GeometryGeometryOperationNotSupportedExceptionGeometryOperationExceptionpublic com.vividsolutions.jts.geom.Geometry getJTS()
getJTS in interface GeometryJTSpublic Geometry cloneGeometry()
GeometrycloneGeometry in interface Geometrypublic int getDimension()
GeometrygetDimension in interface Geometrypublic Handler[] getHandlers(int type)
GeometrygetHandlers in interface Geometrytype - Type of handlers.public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at,
double flatness)
GeometrygetPathIterator in interface java.awt.ShapegetPathIterator in interface Geometryat - The affine transformation.public GeneralPathX getGeneralPath()
GeometrygetGeneralPath in interface Geometrypublic MultiPoint toPoints() throws GeometryException
GeometrytoPoints in interface GeometryGeometryExceptionpublic MultiLine toLines() throws GeometryException
GeometrytoLines in interface GeometryGeometryExceptionpublic MultiPolygon toPolygons() throws GeometryException
GeometrytoPolygons in interface GeometryGeometryExceptionpublic java.util.Collection<? extends Geometry> getElements()
getElements in interface Complexpublic 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 ComplexCreateGeometryExceptionpublic boolean isEmpty()