com.supermap.data
类 GeoCompound
- java.lang.Object
-
- com.supermap.data.Geometry
-
- com.supermap.data.GeoCompound
-
public class GeoCompound extends Geometry
复合几何对象类。
-
-
构造器概要
构造器 构造器和说明 GeoCompound()构造一个新的 GeoCompound 对象。GeoCompound(GeoCompound geoCompound)用指定的 GeoCompound 对象构造一个与其完全相同的新对象。
-
方法概要
所有方法 实例方法 具体方法 限定符和类型 方法和说明 intaddPart(Geometry geometry)向此复合几何对象追加一个子对象。voidadjust(boolean isMinGeometryMovedUp)调整复合几何对象中子对象的叠置顺序GeoCompoundclone()克隆对象。voiddispose()析构对象。Geometry[]divide(boolean isTopOnly)分解复合几何对象。GeometrygetPart(int index)返回此复合几何对象中指定序号的子对象。intgetPartCount()返回复合几何对象的子对象个数。booleaninsertPart(int index, Geometry geometry)向复合几何对象中的指定序号的位置处插入一个子对象。booleanisEmpty()返回复合几何对象是否为空,即其子对象个数是否为零。voidoffset(double dx, double dy)偏移几何对象。booleanremovePart(int index)删除此复合几何对象中的指定序号的子对象。voidrotate(Point2D basePoint, double angle)旋转几何对象。voidsetEmpty()清空几何对象。booleansetPart(int index, Geometry geometry)用指定的几何对象替换复合几何对象中指定序号处的子对象。
-
-
-
构造器详细资料
-
GeoCompound
public GeoCompound()
构造一个新的 GeoCompound 对象。
-
GeoCompound
public GeoCompound(GeoCompound geoCompound)
用指定的 GeoCompound 对象构造一个与其完全相同的新对象。- 参数:
geoCompound- 指定的 eoCompound 对象。
-
-
方法详细资料
-
addPart
public int addPart(Geometry geometry)
向此复合几何对象追加一个子对象。- 参数:
geometry- 要添加的子对象。- 返回:
- 成功返回添加的索引,失败就返回-1。
-
getPartCount
public int getPartCount()
返回复合几何对象的子对象个数。- 返回:
- 该复合几何对象的子对象个数。
- Default:
- 默认值为 0。
-
removePart
public boolean removePart(int index)
删除此复合几何对象中的指定序号的子对象。- 参数:
index- int 指定的子对象的序号。- 返回:
- 成功则返回 true,否则返回 false。
-
getPart
public Geometry getPart(int index)
返回此复合几何对象中指定序号的子对象。- 参数:
index- 指定要获取的子对象序号。- 返回:
- 成功返回
Geometry对象,失败返回空值。
-
insertPart
public boolean insertPart(int index, Geometry geometry)向复合几何对象中的指定序号的位置处插入一个子对象。- 参数:
index- 指定的插入位置,默认值为1。geometry- 待插入的子对象。- 返回:
- 插入成功返回true,否则,返回false。
-
setPart
public boolean setPart(int index, Geometry geometry)用指定的几何对象替换复合几何对象中指定序号处的子对象。- 参数:
index- 被替换的子对象的序号,必须大于或等于0。geometry- 指定的几何对象。- 返回:
- 成功则返回 true,否则返回 false。
-
adjust
public void adjust(boolean isMinGeometryMovedUp)
调整复合几何对象中子对象的叠置顺序- 参数:
isMinGeometryMovedUp- 是否将较小的子对象移到上面。
-
divide
public Geometry[] divide(boolean isTopOnly)
分解复合几何对象。如果isTopOnly为true,那么返回的几何对象中,可能还存在复合几何对象,反之,则不会。
- 参数:
isTopOnly- 是否只分割上层对象。- 返回:
- 子对象列表。
-
clone
public GeoCompound clone()
克隆对象。
-
isEmpty
public boolean isEmpty()
返回复合几何对象是否为空,即其子对象个数是否为零。
-
rotate
public void rotate(Point2D basePoint, double angle)
旋转几何对象。
-
offset
public void offset(double dx, double dy)偏移几何对象。
-
-