public class TLcdGML32Polygon extends TLcdGML32AbstractSurface implements ILcdEditableSurface
Modifier and Type | Field and Description |
---|---|
static TLcdDataProperty |
EXTERIOR_PROPERTY
Data property that maps to the
exterior element. |
static TLcdDataProperty |
INTERIOR_PROPERTY
Data property that maps to the
interior element. |
SRS_PROPERTY
DESCRIPTION_PROPERTY, DESCRIPTION_REFERENCE_PROPERTY, ID_PROPERTY, IDENTIFIER_PROPERTY, META_DATA_PROPERTY_PROPERTY, NAME_PROPERTY
Constructor and Description |
---|
TLcdGML32Polygon() |
TLcdGML32Polygon(ILcdModelReference aSrs)
Constructs a polygon and initializes its
model reference (srs).
|
TLcdGML32Polygon(TLcdDataType aType) |
TLcdGML32Polygon(TLcdDataType aDataType,
ILcdModelReference aSrs)
Constructs a polygon and initializes its
model reference (srs).
|
Modifier and Type | Method and Description |
---|---|
TLcdGML32Polygon |
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. |
TLcdGML32AbstractRing |
getExterior()
Returns the role value contained in the value of the
EXTERIOR_PROPERTY property. |
ILcdRing |
getExteriorRing()
Returns the exterior boundary of this surface.
|
ILcdPoint |
getFocusPoint()
Returns the focus point of this
ILcdShape . |
List<TLcdGML32AbstractRing> |
getInterior()
Gets the value of the
INTERIOR_PROPERTY property adapted to a list of TLcdGML32AbstractRing instances. |
List<ILcdRing> |
getInteriorRings()
Returns the holes in this surface, as a list of
ILcdRing instances. |
void |
setExterior(TLcdGML32AbstractRing aValue)
Sets the value of the property that maps to the
exterior element. |
void |
setExteriorRing(ILcdRing aExteriorRing)
Sets the exterior boundary of this surface.
|
getSrs, setSrs, toString
getDescription, getDescriptionReference, getId, getIdentifier, getMetaDataProperty, getName, setDescription, setDescriptionReference, setId, setIdentifier
getDataType, getValue, getValue, hasValue, hasValue, setValue, setValue
public static final TLcdDataProperty EXTERIOR_PROPERTY
exterior
element.
The possible values for this property are instances of TLcdGML32AbstractRingProperty
.public static final TLcdDataProperty INTERIOR_PROPERTY
interior
element.
The possible values for this property are instances of List<TLcdGML32AbstractRingProperty>
.public TLcdGML32Polygon()
public TLcdGML32Polygon(TLcdDataType aType)
public TLcdGML32Polygon(ILcdModelReference aSrs)
aSrs
- the model reference for this objectTLcdGML32AbstractGeometry.setSrs(ILcdModelReference)
public TLcdGML32Polygon(TLcdDataType aDataType, ILcdModelReference aSrs)
aDataType
- the data type for this objectaSrs
- the model reference for this objectTLcdGML32AbstractGeometry.setSrs(ILcdModelReference)
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 TLcdGML32AbstractGeometry
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 TLcdGML32AbstractGeometry
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 TLcdGML32AbstractGeometry
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 TLcdGML32AbstractGeometry
aPoint
- the ILcdPoint
to test.ILcdShape.contains3D(double, double, double)
public ILcdPoint getFocusPoint()
ILcdShape
ILcdShape
.getFocusPoint
in interface ILcdShape
getFocusPoint
in class TLcdGML32AbstractGeometry
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 TLcdGML32AbstractGeometry
ILcdBounds
by which the geometry of this ILcdBounded
object
is bounded.public TLcdGML32Polygon 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 TLcdGML32AbstractRing getExterior()
EXTERIOR_PROPERTY
property. Returns null
if the value of the EXTERIOR_PROPERTY
property is null
.
A boundary of a surface consists of a number of rings. In the normal 2D case, one of these rings is distinguished as being the exterior boundary. In a general manifold this is not always possible, in which case all boundaries shall be listed as interior boundaries, and the exterior will be empty.
EXTERIOR_PROPERTY
property.TLcdGML32AbstractRingProperty
public void setExterior(TLcdGML32AbstractRing aValue)
exterior
element. to a new instance of the association class TLcdGML32AbstractRingProperty
initialized with the given role value. In case the given role value is null
, the EXTERIOR_PROPERTY
property is set to null
.
A boundary of a surface consists of a number of rings. In the normal 2D case, one of these rings is distinguished as being the exterior boundary. In a general manifold this is not always possible, in which case all boundaries shall be listed as interior boundaries, and the exterior will be empty.
aValue
- the role value to set for the EXTERIOR_PROPERTY
property.public List<TLcdGML32AbstractRing> getInterior()
INTERIOR_PROPERTY
property adapted to a list of TLcdGML32AbstractRing
instances.
A boundary of a surface consists of a number of rings. The "interior" rings separate the surface / surface patch from the area enclosed by the rings.
INTERIOR_PROPERTY
property adapted to a list of TLcdGML32AbstractRing
instances.TLcdGML32AbstractRingProperty