public class TLcdGML2Polygon extends TLcdGML2AbstractGeometry implements ILcdEditableSurface, ILcdComplexPolygon
Modifier and Type | Field and Description |
---|---|
static TLcdDataProperty |
INNER_BOUNDARY_IS_PROPERTY
Data property that maps to the
innerBoundaryIs element. |
static TLcdDataProperty |
OUTER_BOUNDARY_IS_PROPERTY
Data property that maps to the
outerBoundaryIs element. |
GID_PROPERTY, SRS_PROPERTY
Constructor and Description |
---|
TLcdGML2Polygon() |
TLcdGML2Polygon(ILcdModelReference aSrs)
Constructs a polygon and initializes its
model reference (srs).
|
TLcdGML2Polygon(TLcdDataType aType) |
TLcdGML2Polygon(TLcdDataType aDataType,
ILcdModelReference aSrs)
Constructs a polygon and initializes its
model reference (srs).
|
Modifier and Type | Method and Description |
---|---|
TLcdGML2Polygon |
clone()
Returns a deep clone of this object.
|
TLcdDataObject |
clone(Map aObjectDictionary)
Returns a deep clone of this object.
|
boolean |
contains2D(double aX,
double aY)
Checks whether this
ILcdShape contains the given point in
the 2D space. |
boolean |
contains2D(ILcdPoint aPoint)
Checks whether this
ILcdShape contains the given ILcdPoint in the 2D space. |
boolean |
contains3D(double aX,
double aY,
double aZ)
Checks whether this
ILcdShape contains the given point in
the 3D space. |
boolean |
contains3D(ILcdPoint aPoint)
Checks whether this
ILcdShape contains the given ILcdPoint in the 3D space. |
ILcdBounds |
getBounds()
Returns the
ILcdBounds by which the geometry of this ILcdBounded object
is bounded. |
ILcdRing |
getExteriorRing()
Returns the exterior boundary of this surface.
|
ILcdPoint |
getFocusPoint()
Returns the focus point of this
ILcdShape . |
List<TLcdGML2LinearRingMember> |
getInnerBoundaryIs()
Returns the value of the property that maps to the
innerBoundaryIs element. |
List<ILcdRing> |
getInteriorRings()
Returns the holes in this surface, as a list of
ILcdRing instances. |
TLcdGML2LinearRingMember |
getOuterBoundaryIs()
Returns the value of the property that maps to the
outerBoundaryIs element. |
ILcdPoint |
getPoint(int aIndex)
Returns the
ILcdPoint at a given index. |
int |
getPointCount()
Returns the number of
ILcdPoint objects in the list. |
ILcdPolygon |
getPolygon(int aIndex)
Returns the
ILcdPolygon at the given index. |
int |
getPolygonCount()
Returns the number of
ILcdPolygon objects in the list. |
void |
setExteriorRing(ILcdRing aExteriorRing)
Sets the exterior boundary of this surface.
|
void |
setOuterBoundaryIs(TLcdGML2LinearRingMember aValue)
Sets the value of the property that maps to the
outerBoundaryIs element. |
getGid, getSrs, setGid, setSrs
canSetFeature, getFeature, getFeature, getFeatureCount, getFeaturedDescriptor, setFeature, setFeature
getDataType, getValue, getValue, hasValue, hasValue, setValue, setValue, toString
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getPointSFCT, getX, getY, getZ
public static final TLcdDataProperty OUTER_BOUNDARY_IS_PROPERTY
outerBoundaryIs
element.
The possible values for this property are instances of TLcdGML2LinearRingMember
.public static final TLcdDataProperty INNER_BOUNDARY_IS_PROPERTY
innerBoundaryIs
element.
The possible values for this property are instances of List<TLcdGML2LinearRingMember>
.public TLcdGML2Polygon()
public TLcdGML2Polygon(TLcdDataType aType)
public TLcdGML2Polygon(ILcdModelReference aSrs)
aSrs
- the model reference for this objectTLcdGML2AbstractGeometry.setSrs(ILcdModelReference)
public TLcdGML2Polygon(TLcdDataType aDataType, ILcdModelReference aSrs)
aDataType
- the data type for this objectaSrs
- the model reference for this objectTLcdGML2AbstractGeometry.setSrs(ILcdModelReference)
public ILcdPolygon getPolygon(int aIndex) throws IndexOutOfBoundsException
ILcdComplexPolygon
ILcdPolygon
at the given index.getPolygon
in interface ILcdComplexPolygon
aIndex
- a valid index in the list of ILcdPolygon
objects.ILcdPolygon
at the given index.IndexOutOfBoundsException
- when the index is not valid.public int getPolygonCount()
ILcdComplexPolygon
ILcdPolygon
objects in the list.getPolygonCount
in interface ILcdComplexPolygon
ILcdPolygon
objects in the list.public int getPointCount()
ILcdPointList
ILcdPoint
objects in the list.getPointCount
in interface ILcdPointList
ILcdPoint
objects in the list.public ILcdPoint getPoint(int aIndex) throws IndexOutOfBoundsException
ILcdPointList
ILcdPoint
at a given index.getPoint
in interface ILcdPointList
aIndex
- a valid index in the list of ILcdPoint
objects.ILcdPoint
at the given index.IndexOutOfBoundsException
- if the given index is out of bounds.public void setExteriorRing(ILcdRing aExteriorRing)
ILcdEditableSurface
Note that this implementations may throw a
ClassCastException
or IllegalArgumentException
in case the class of the ring is not
compatible with the implementation of the surface. Implementations should
specify in their documentation all restrictions that apply in this context.
setExteriorRing
in interface ILcdEditableSurface
aExteriorRing
- the exterior boundary of this surface.public ILcdRing getExteriorRing()
ILcdSurface
getExteriorRing
in interface ILcdSurface
public List<ILcdRing> getInteriorRings()
ILcdEditableSurface
ILcdRing
instances.
If there are no holes, an empty list is returned.
The returned list is editable and can be used to add, remove or replace interior rings.
getInteriorRings
in interface ILcdEditableSurface
getInteriorRings
in interface ILcdSurface
public boolean contains2D(double aX, double aY)
ILcdShape
ILcdShape
contains the given point in
the 2D space. Only the first two dimensions of the ILcdShape
are considered.contains2D
in interface ILcdShape
contains2D
in class TLcdGML2AbstractGeometry
aX
- the x coordinate of the point.aY
- the y coordinate of the point.public boolean contains3D(double aX, double aY, double aZ)
ILcdShape
ILcdShape
contains the given point in
the 3D space.contains3D
in interface ILcdShape
contains3D
in class TLcdGML2AbstractGeometry
aX
- the x coordinate of the point.aY
- the y coordinate of the point.aZ
- the z coordinate of the point.public boolean contains2D(ILcdPoint aPoint)
ILcdShape
ILcdShape
contains the given ILcdPoint
in the 2D space.
Only the first two dimensions of the ILcdShape
and the ILcdPoint
are considered.contains2D
in interface ILcdShape
contains2D
in class TLcdGML2AbstractGeometry
aPoint
- the ILcdPoint
to test.ILcdShape.contains2D(double, double)
public boolean contains3D(ILcdPoint aPoint)
ILcdShape
ILcdShape
contains the given ILcdPoint
in the 3D space.contains3D
in interface ILcdShape
contains3D
in class TLcdGML2AbstractGeometry
aPoint
- the ILcdPoint
to test.ILcdShape.contains3D(double, double, double)
public ILcdPoint getFocusPoint()
ILcdShape
ILcdShape
.getFocusPoint
in interface ILcdShape
getFocusPoint
in class TLcdGML2AbstractGeometry
ILcdShape
.public ILcdBounds getBounds()
ILcdBounded
ILcdBounds
by which the geometry of this ILcdBounded
object
is bounded.
If the geometry does not allow retrieving valid bounds (for example a polyline with 0 points)
the return value is unspecified.
It is highly recommended to return an undefined
bounds.
You can create undefined bounds using the default constructors
of TLcdLonLatBounds
or TLcdXYBounds
.
getBounds
in interface ILcdBounded
getBounds
in class TLcdGML2AbstractGeometry
ILcdBounds
by which the geometry of this ILcdBounded
object
is bounded.public TLcdGML2Polygon clone()
TLcdDataObject
TLcdDataObject.clone(Map)
.clone
in interface ILcdCloneable
clone
in class TLcdDataObject
Object.clone()
public TLcdDataObject clone(Map aObjectDictionary)
TLcdDataObject
ILcdDataObject
, the value is cloned by first creating a new instance via
the value.getDataType().newInstance()
method, and then cloning its properties one by one.ILcdDeepCloneable
or
ILcdCloneable
then this interface is used to clone the value.clone
in interface ILcdDeepCloneable
clone
in class TLcdDataObject
aObjectDictionary
- the Object dictionary that keeps track of the objects for which a clone has already been made,
and their corresponding clone Object.public TLcdGML2LinearRingMember getOuterBoundaryIs()
outerBoundaryIs
element.OUTER_BOUNDARY_IS_PROPERTY
property.public void setOuterBoundaryIs(TLcdGML2LinearRingMember aValue)
outerBoundaryIs
element.aValue
- the value to set for the OUTER_BOUNDARY_IS_PROPERTY
property.public List<TLcdGML2LinearRingMember> getInnerBoundaryIs()
innerBoundaryIs
element.INNER_BOUNDARY_IS_PROPERTY
property.