public class TLcdGML31Polygon extends TLcdGML31AbstractSurface implements ILcdEditableSurface
Modifier and Type | Field and Description |
---|---|
static TLcdDataProperty |
EXTERIOR_PROPERTY
Data property that maps to the
exterior element. |
static TLcdDataProperty |
GID_PROPERTY
Property that maps on the
gid attribute. |
static TLcdDataProperty |
INTERIOR_PROPERTY
Data property that maps to the
interior element. |
SRS_PROPERTY
DESCRIPTION_PROPERTY, ID_PROPERTY, META_DATA_PROPERTY_PROPERTY, NAME_PROPERTY
Constructor and Description |
---|
TLcdGML31Polygon() |
TLcdGML31Polygon(ILcdModelReference aSrs)
Constructs a polygon and initializes its
model reference (srs).
|
TLcdGML31Polygon(TLcdDataType aType) |
TLcdGML31Polygon(TLcdDataType aDataType,
ILcdModelReference aSrs)
Constructs a polygon and initializes its
model reference (srs).
|
Modifier and Type | Method and Description |
---|---|
TLcdGML31Polygon |
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. |
TLcdGML31AbstractRing |
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 . |
String |
getGid()
Gets the value of the
GID_PROPERTY property. |
List<TLcdGML31AbstractRing> |
getInterior()
Gets the value of the
INTERIOR_PROPERTY property adapted to a list of TLcdGML31AbstractRing instances. |
List<ILcdRing> |
getInteriorRings()
Returns the holes in this surface, as a list of
ILcdRing instances. |
void |
setExterior(TLcdGML31AbstractRing aValue)
Sets the value of the property that maps to the
exterior element. |
void |
setExteriorRing(ILcdRing aExteriorRing)
Sets the exterior boundary of this surface.
|
void |
setGid(String aValue)
Sets the value of the
GID_PROPERTY property. |
getSrs, setSrs, toString
getDescription, getId, getMetaDataProperty, getName, setDescription, setId
canSetFeature, getFeature, getFeature, getFeatureCount, getFeaturedDescriptor, setFeature, setFeature
getDataType, getValue, getValue, hasValue, hasValue, setValue, setValue
public static final TLcdDataProperty EXTERIOR_PROPERTY
exterior
element.
The possible values for this property are instances of TLcdGML31AbstractRingProperty
.public static final TLcdDataProperty INTERIOR_PROPERTY
interior
element.
The possible values for this property are instances of List<TLcdGML31AbstractRingProperty>
.public static final TLcdDataProperty GID_PROPERTY
gid
attribute. Acceptable values for this property are instances of java.lang.String
.public TLcdGML31Polygon()
public TLcdGML31Polygon(TLcdDataType aType)
public TLcdGML31Polygon(ILcdModelReference aSrs)
aSrs
- the model reference for this objectTLcdGML31AbstractGeometry.setSrs(ILcdModelReference)
public TLcdGML31Polygon(TLcdDataType aDataType, ILcdModelReference aSrs)
aDataType
- the data type for this objectaSrs
- the model reference for this objectTLcdGML31AbstractGeometry.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 TLcdGML31AbstractGeometry
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 TLcdGML31AbstractGeometry
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 TLcdGML31AbstractGeometry
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 TLcdGML31AbstractGeometry
aPoint
- the ILcdPoint
to test.ILcdShape.contains3D(double, double, double)
public ILcdPoint getFocusPoint()
ILcdShape
ILcdShape
.getFocusPoint
in interface ILcdShape
getFocusPoint
in class TLcdGML31AbstractGeometry
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 TLcdGML31AbstractGeometry
ILcdBounds
by which the geometry of this ILcdBounded
object
is bounded.public TLcdGML31Polygon 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 TLcdGML31AbstractRing 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.TLcdGML31AbstractRingProperty
public void setExterior(TLcdGML31AbstractRing aValue)
exterior
element. to a new instance of the association class TLcdGML31AbstractRingProperty
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<TLcdGML31AbstractRing> getInterior()
INTERIOR_PROPERTY
property adapted to a list of TLcdGML31AbstractRing
instances.
A boundary of a surface consists of a number of rings. The "interior" rings seperate the surface / surface patch from the area enclosed by the rings.
INTERIOR_PROPERTY
property adapted to a list of TLcdGML31AbstractRing
instances.TLcdGML31AbstractRingProperty
public String getGid()
GID_PROPERTY
property.
This attribute is included for backward compatibility with GML 2 and is deprecated with GML 3. This identifer is superceded by "gml:id" inherited from AbstractGMLType. The attribute "gid" should not be used anymore and may be deleted in future versions of GML without further notice.
GID_PROPERTY
property.public void setGid(String aValue)
GID_PROPERTY
property.
This attribute is included for backward compatibility with GML 2 and is deprecated with GML 3. This identifer is superceded by "gml:id" inherited from AbstractGMLType. The attribute "gid" should not be used anymore and may be deleted in future versions of GML without further notice.
aValue
- the value to set for the GID_PROPERTY
property.