public class TLcdGML31MultiGeometry extends TLcdGML31AbstractGeometricAggregate implements ILcdEditableShapeList
gml:MultiGeometry is a collection of one or more GML geometry objects of arbitrary type.
The members of the geometric aggregate may be specified either using the "standard" property (gml:geometryMember) or the array property (gml:geometryMembers). It is also valid to use both the "standard" and the array properties in the same collection.
Modifier and Type | Field and Description |
---|---|
static TLcdDataProperty |
GEOMETRY_MEMBER_PROPERTY
Data property that maps to the
geometryMember element. |
static TLcdDataProperty |
GEOMETRY_MEMBERS_PROPERTY
Data property that maps to the
geometryMembers element. |
static TLcdDataProperty |
GID_PROPERTY
Property that maps on the
gid attribute. |
SRS_PROPERTY
DESCRIPTION_PROPERTY, ID_PROPERTY, META_DATA_PROPERTY_PROPERTY, NAME_PROPERTY
Constructor and Description |
---|
TLcdGML31MultiGeometry() |
TLcdGML31MultiGeometry(ILcdModelReference aSrs)
Constructs a multi geometry and initializes its
model reference (srs).
|
TLcdGML31MultiGeometry(TLcdDataType aType) |
TLcdGML31MultiGeometry(TLcdDataType aDataType,
ILcdModelReference aSrs)
Constructs a multi geometry and initializes its
model reference (srs).
|
Modifier and Type | Method and Description |
---|---|
void |
addShape(ILcdShape aShape)
Appends the specified shape to the end of this
ILcdShapeList . |
void |
addShape(int aIndex,
ILcdShape aShape)
Inserts the specified shape at the specified position in this
ILcdShapeList . |
void |
addShapes(ILcdShape[] aShapes)
Appends the specified array of shapes to the end of this
ILcdShapeList . |
void |
clearShapes()
Removes all of the shapes from this
ILcdShapeList . |
TLcdGML31MultiGeometry |
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. |
ILcdPoint |
getFocusPoint()
Returns the focus point of this
ILcdShape . |
List<TLcdGML31AbstractGeometry> |
getGeometryMember()
Returns the value of the property that maps to the
geometryMember element. |
List<TLcdGML31AbstractGeometry> |
getGeometryMembers()
Returns the role value contained in the value of the
GEOMETRY_MEMBERS_PROPERTY property. |
String |
getGid()
Gets the value of the
GID_PROPERTY property. |
ILcdShape |
getShape(int aIndex)
Returns the
ILcdShape at the given index. |
int |
getShapeCount()
Returns the number of
ILcdShape objects in the list. |
boolean |
removeShape(ILcdShape aShape)
Removes the first occurrence of the specified shape in this
ILcdShapeList . |
ILcdShape |
removeShape(int aIndex)
Removes the shape at the specified position in this
ILcdShapeList . |
void |
removeShapes(ILcdShape[] aShapes)
Removes all shapes from this
ILcdShapeList that are contained in the specified
array of shapes. |
void |
setGeometryMembers(List<TLcdGML31AbstractGeometry> aValue)
Sets the value of the property that maps to the
geometryMembers element. |
void |
setGid(String aValue)
Sets the value of the
GID_PROPERTY property. |
ILcdShape |
setShape(int aIndex,
ILcdShape aShape)
Replaces the shape at the specified position in this
ILcdShapeList with the
specified shape. |
void |
setShapes(ILcdShape[] aShapes)
Replace the list of shapes contained in this
ILcdShapeList with the specified
array of shapes. |
void |
shapeChanged(ILcdShape aShape)
Notifies this
ILcdShapeList that the specified shape has changed. |
void |
shapeChanged(int aIndex)
Notifies this
ILcdShapeList that the shape at the specified position has changed. |
void |
shapesChanged()
Notifies this
ILcdShapeList that some (possibly all) of its shapes have changed. |
invalidateObject
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 GEOMETRY_MEMBER_PROPERTY
geometryMember
element.
The possible values for this property are instances of List<TLcdGML31GeometryProperty>
.public static final TLcdDataProperty GEOMETRY_MEMBERS_PROPERTY
geometryMembers
element.
The possible values for this property are instances of TLcdGML31GeometryArrayProperty
.public static final TLcdDataProperty GID_PROPERTY
gid
attribute. Acceptable values for this property are instances of java.lang.String
.public TLcdGML31MultiGeometry()
public TLcdGML31MultiGeometry(TLcdDataType aType)
public TLcdGML31MultiGeometry(ILcdModelReference aSrs)
aSrs
- the model reference for this objectTLcdGML31AbstractGeometry.setSrs(ILcdModelReference)
public TLcdGML31MultiGeometry(TLcdDataType aDataType, ILcdModelReference aSrs)
aDataType
- the data type for this objectaSrs
- the model reference for this objectTLcdGML31AbstractGeometry.setSrs(ILcdModelReference)
public void addShape(int aIndex, ILcdShape aShape)
ILcdEditableShapeList
ILcdShapeList
.addShape
in interface ILcdEditableShapeList
addShape
in class TLcdGML31AbstractGeometricAggregate
aIndex
- the index at which the shape is to be inserted.aShape
- the shape to be inserted.public void addShape(ILcdShape aShape)
ILcdEditableShapeList
ILcdShapeList
.addShape
in interface ILcdEditableShapeList
addShape
in class TLcdGML31AbstractGeometricAggregate
aShape
- the shape to be appended to this ILcdShapeList
.public void addShapes(ILcdShape[] aShapes)
ILcdEditableShapeList
ILcdShapeList
.addShapes
in interface ILcdEditableShapeList
addShapes
in class TLcdGML31AbstractGeometricAggregate
aShapes
- the array of shapes to be appended to this ILcdShapeList
.public void clearShapes()
ILcdEditableShapeList
ILcdShapeList
.clearShapes
in interface ILcdEditableShapeList
clearShapes
in class TLcdGML31AbstractGeometricAggregate
public ILcdShape removeShape(int aIndex)
ILcdEditableShapeList
ILcdShapeList
. Shifts any
subsequent shapes to the left. Returns the shape that was removed from this
ILcdShapeList
.removeShape
in interface ILcdEditableShapeList
removeShape
in class TLcdGML31AbstractGeometricAggregate
aIndex
- the index of the shape to removed.public boolean removeShape(ILcdShape aShape)
ILcdEditableShapeList
ILcdShapeList
. If this
ILcdShapeList
does not contain the shape, it is unchanged.removeShape
in interface ILcdEditableShapeList
removeShape
in class TLcdGML31AbstractGeometricAggregate
aShape
- the shape to be removed, if present.true
if this ILcdShapeList
contained the specified element.public void removeShapes(ILcdShape[] aShapes)
ILcdEditableShapeList
ILcdShapeList
that are contained in the specified
array of shapes.removeShapes
in interface ILcdEditableShapeList
removeShapes
in class TLcdGML31AbstractGeometricAggregate
aShapes
- the array of shapes to be removed from this ILcdShapeList
.public ILcdShape setShape(int aIndex, ILcdShape aShape)
ILcdEditableShapeList
ILcdShapeList
with the
specified shape.setShape
in interface ILcdEditableShapeList
setShape
in class TLcdGML31AbstractGeometricAggregate
aIndex
- index of shape to replace.aShape
- the shape to be stored at the specified position.public void setShapes(ILcdShape[] aShapes)
ILcdEditableShapeList
ILcdShapeList
with the specified
array of shapes.setShapes
in interface ILcdEditableShapeList
setShapes
in class TLcdGML31AbstractGeometricAggregate
aShapes
- the array of shapes to be stored in this ILcdShapeList
.public void shapeChanged(int aIndex)
ILcdEditableShapeList
ILcdShapeList
that the shape at the specified position has changed.shapeChanged
in interface ILcdEditableShapeList
shapeChanged
in class TLcdGML31AbstractGeometricAggregate
aIndex
- the index of the shape that has changed.public void shapeChanged(ILcdShape aShape)
ILcdEditableShapeList
ILcdShapeList
that the specified shape has changed.shapeChanged
in interface ILcdEditableShapeList
shapeChanged
in class TLcdGML31AbstractGeometricAggregate
aShape
- the shape that has changed.public void shapesChanged()
ILcdEditableShapeList
ILcdShapeList
that some (possibly all) of its shapes have changed.shapesChanged
in interface ILcdEditableShapeList
shapesChanged
in class TLcdGML31AbstractGeometricAggregate
public int getShapeCount()
ILcdShapeList
ILcdShape
objects in the list.getShapeCount
in interface ILcdShapeList
getShapeCount
in class TLcdGML31AbstractGeometricAggregate
ILcdShape
objects in the list.public ILcdShape getShape(int aIndex)
ILcdShapeList
ILcdShape
at the given index.getShape
in interface ILcdShapeList
getShape
in class TLcdGML31AbstractGeometricAggregate
aIndex
- a valid index in the list of ILcdShape
objects.ILcdShape
at the given index.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 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(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 ILcdPoint getFocusPoint()
ILcdShape
ILcdShape
.getFocusPoint
in interface ILcdShape
getFocusPoint
in class TLcdGML31AbstractGeometry
ILcdShape
.public TLcdGML31MultiGeometry 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 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 List<TLcdGML31AbstractGeometry> getGeometryMember()
geometryMember
element.
This property element either references a geometry element via the XLink-attributes or contains the geometry element.
GEOMETRY_MEMBER_PROPERTY
property.List
public List<TLcdGML31AbstractGeometry> getGeometryMembers()
GEOMETRY_MEMBERS_PROPERTY
property. Returns null
if the value of the GEOMETRY_MEMBERS_PROPERTY
property is null
.
This property element contains a list of geometry elements. The order of the elements is significant and shall be preserved when processing the array.
GEOMETRY_MEMBERS_PROPERTY
property.TLcdGML31GeometryArrayProperty
public void setGeometryMembers(List<TLcdGML31AbstractGeometry> aValue)
geometryMembers
element. to a new instance of the association class TLcdGML31GeometryArrayProperty
initialized with the given role value. In case the given role value is null
, the GEOMETRY_MEMBERS_PROPERTY
property is set to null
.
This property element contains a list of geometry elements. The order of the elements is significant and shall be preserved when processing the array.
aValue
- the role value to set for the GEOMETRY_MEMBERS_PROPERTY
property.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.