com.supermap.data
Class GeoCompound
- java.lang.Object
-
- com.supermap.data.Geometry
-
- com.supermap.data.GeoCompound
-
public class GeoCompound extends Geometry
The GeoCompound class.
-
-
Constructor Summary
Constructors Constructor and Description GeoCompound()
Constructs a new GeoCompound object.GeoCompound(GeoCompound geoCompound)
Initializes a new instance according to the specified GeoCompound object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description int
addPart(Geometry geometry)
Appends a part to this GeoCompound object.void
adjust(boolean isMinGeometryMovedUp)
Adjust the stacking order of subobjects in composite geometric objects.GeoCompound
clone()
Clone objectvoid
dispose()
Destructor.object.Geometry[]
divide(boolean isTopOnly)
Decompose GeoCompound objects.Geometry
getPart(int index)
Returns the subobject of the GeoCompound object with the specified index.int
getPartCount()
Returns the count of the subobjects of the GeoCompound object.boolean
insertPart(int index, Geometry geometry)
Insert a subobject at the location of the specified serial number in the GeoCompound object.boolean
isEmpty()
Returns a value indicating whether the count of the subobjects of this GeoCompound object is zero.void
offset(double dx, double dy)
Offset geometry object.boolean
removePart(int index)
Removes the subobject of the GeoCompound object with the specified index.void
rotate(Point2D basePoint, double angle)
Rotate geometry object.void
setEmpty()
Empty the geometry object.boolean
setPart(int index, Geometry geometry)
Replaces the subobject at the specified ordinal in the GeoCompound object with the specified geometric object.
-
-
-
Constructor Detail
-
GeoCompound
public GeoCompound()
Constructs a new GeoCompound object.
-
GeoCompound
public GeoCompound(GeoCompound geoCompound)
Initializes a new instance according to the specified GeoCompound object.- Parameters:
geoCompound
- the specified eoCompound object.
-
-
Method Detail
-
addPart
public int addPart(Geometry geometry)
Appends a part to this GeoCompound object.- Parameters:
geometry
- the subobject to add.- Returns:
- Returns the added index ,If succeed ,otherwise, returns -1 .
-
getPartCount
public int getPartCount()
Returns the count of the subobjects of the GeoCompound object.- Returns:
- the count of the subobjects of the GeoCompound object.
- Default:
- The default value is 0.
-
removePart
public boolean removePart(int index)
Removes the subobject of the GeoCompound object with the specified index.- Parameters:
index
- int The index number of the specified part.- Returns:
- Returns true, if successful; otherwise false.
-
getPart
public Geometry getPart(int index)
Returns the subobject of the GeoCompound object with the specified index.- Parameters:
index
- Specifies the number of subobjects to get.- Returns:
- Returns the
Geometry
object if succeed, return null if failed.
-
insertPart
public boolean insertPart(int index, Geometry geometry)
Insert a subobject at the location of the specified serial number in the GeoCompound object.- Parameters:
index
- The specified insertion position, the default value is 1.geometry
- The subobject to be inserted.- Returns:
- Return true if insert successful; otherwise false.
-
setPart
public boolean setPart(int index, Geometry geometry)
Replaces the subobject at the specified ordinal in the GeoCompound object with the specified geometric object.- Parameters:
index
- The sequence number of the replaced subobject must be greater than or equal to zero.geometry
- The specified Geometry object.- Returns:
- Returns true, if successful; otherwise false.
-
adjust
public void adjust(boolean isMinGeometryMovedUp)
Adjust the stacking order of subobjects in composite geometric objects.- Parameters:
isMinGeometryMovedUp
- Whether to move smaller subobjects to the top.
-
divide
public Geometry[] divide(boolean isTopOnly)
Decompose GeoCompound objects.If isTopOnly is true, then the return geometry object, there may be a composite geometric object, otherwise, will not.
- Parameters:
isTopOnly
- Whether to split only the top object.- Returns:
- Subobject list.
-
clone
public GeoCompound clone()
Clone object
-
isEmpty
public boolean isEmpty()
Returns a value indicating whether the count of the subobjects of this GeoCompound object is zero.
-
rotate
public void rotate(Point2D basePoint, double angle)
Rotate geometry object.
-
offset
public void offset(double dx, double dy)
Offset geometry object.
-
-