com.supermap.desktop.core.utilties
类 GeometryUtilities
- java.lang.Object
-
- com.supermap.desktop.core.utilties.GeometryUtilities
-
public class GeometryUtilities extends java.lang.Object
对象操作类
-
-
嵌套类概要
嵌套类 限定符和类型 类和说明 static class
GeometryUtilities.GeometryPointType
-
方法概要
所有方法 静态方法 具体方法 限定符和类型 方法和说明 static com.supermap.data.Geometry
boundsConvertToGeoRegion(com.supermap.data.Rectangle2D rectangle2D)
static com.supermap.desktop.core.geometry.Abstract.IGeometry
combination(com.supermap.desktop.core.geometry.Abstract.IGeometry target, com.supermap.mapping.Layer layer)
将指定图层选中的几何对象组合到 geometry 中static com.supermap.desktop.core.geometry.Abstract.IGeometry
combination(com.supermap.desktop.core.geometry.Abstract.IGeometry target, com.supermap.mapping.Layer layer, com.supermap.desktop.core.Interface.IBigDataBusinessUpdateProgress progress)
将指定图层选中的几何对象组合到 geometry 中static com.supermap.data.GeoLine
convertToLine(com.supermap.data.Geometry geometry)
static com.supermap.data.Geometry
convertToLineOrRegion(com.supermap.data.Geometry geometry)
static com.supermap.data.GeoRegion
convertToRegion(com.supermap.data.Geometry geometry)
static com.supermap.data.Rectangle2D
getBounds(com.supermap.data.Geometry... geometries)
获取对象的总范围static com.supermap.data.Rectangle2D
getBounds(com.supermap.data.Geometry geometry, double tolerance)
static com.supermap.data.Geometry
getGeometryByDatasetType(com.supermap.data.DatasetType type)
根据类型创建对应的对象static double
getPerimeter(com.supermap.data.Geometry geometry)
根据对象类型获取周长static int
getVertexCount(com.supermap.data.Geometry geometry)
获得对象的结点个数static com.supermap.data.Geometry
intersect(com.supermap.data.Geometry geometry1, com.supermap.data.Geometry geometry2, boolean isDispose)
两个对象求交。static com.supermap.data.Geometry
intersect(com.supermap.mapping.Layer layer)
将指定图层的选中对象做求交处理static boolean
is3DGeometry(com.supermap.data.Geometry geometry)
判断是否是3D几何类型static boolean
isLineGeometry(com.supermap.data.Geometry geometry)
判断是否线特性对象static boolean
isPointGeometry(com.supermap.data.Geometry geometry)
判断是否点对象static boolean
isRegionGeometry(com.supermap.data.Geometry geometry)
判断是否面特性对象static boolean
isSamePoint2Ds(com.supermap.data.Point2Ds point2Ds1, com.supermap.data.Point2Ds point2Ds2)
判断2个point2Ds是否相等,必须节点数量和顺序一直才返回truestatic boolean
isSamePoint3Ds(com.supermap.data.Point3Ds point2Ds1, com.supermap.data.Point3Ds point2Ds2)
static boolean
isTextGeometry(com.supermap.data.Geometry geometry)
判断是否文本特性对象static <T extends com.supermap.data.Geometry>
TreleaseGeometry(T geometry)
销毁对象static com.supermap.data.Point2Ds
reverse(com.supermap.data.Point2Ds point2Ds)
将指定的 Point2Ds 反序static com.supermap.data.Point3Ds
reverse(com.supermap.data.Point3Ds point3Ds)
将指定的 Point3Ds 反序static void
setGeometryStyle(com.supermap.data.Geometry geometry, com.supermap.data.GeoStyle style)
设置几何对象风格static com.supermap.data.Geometry
simplifyGeometryNodes(com.supermap.data.Geometry geometry, double tolerance)
static com.supermap.data.Geometry
union(com.supermap.data.Geometry geometry1, com.supermap.data.Geometry geometry2, boolean isdispose)
两个对象合并。static com.supermap.data.Geometry
union(com.supermap.data.Geometry geometry1, com.supermap.data.Geometry geometry2, java.lang.Double tolerance, boolean isdispose)
static com.supermap.data.Geometry
union(com.supermap.mapping.Layer layer)
将指定图层的选中对象做合并处理static com.supermap.data.Geometry
xor(com.supermap.data.Geometry geometry1, com.supermap.data.Geometry geometry2, boolean isdispose)
两个对象异或。
-
-
-
方法详细资料
-
isPointGeometry
public static boolean isPointGeometry(com.supermap.data.Geometry geometry)
判断是否点对象
-
isRegionGeometry
public static boolean isRegionGeometry(com.supermap.data.Geometry geometry)
判断是否面特性对象
-
isLineGeometry
public static boolean isLineGeometry(com.supermap.data.Geometry geometry)
判断是否线特性对象
-
isTextGeometry
public static boolean isTextGeometry(com.supermap.data.Geometry geometry)
判断是否文本特性对象
-
is3DGeometry
public static boolean is3DGeometry(com.supermap.data.Geometry geometry)
判断是否是3D几何类型- 参数:
geometry
- 要判断的几何对象- 返回:
- 是否为3D几何类型
-
setGeometryStyle
public static void setGeometryStyle(com.supermap.data.Geometry geometry, com.supermap.data.GeoStyle style)
设置几何对象风格
-
isSamePoint2Ds
public static boolean isSamePoint2Ds(com.supermap.data.Point2Ds point2Ds1, com.supermap.data.Point2Ds point2Ds2)
判断2个point2Ds是否相等,必须节点数量和顺序一直才返回true
-
isSamePoint3Ds
public static boolean isSamePoint3Ds(com.supermap.data.Point3Ds point2Ds1, com.supermap.data.Point3Ds point2Ds2)
-
intersect
public static com.supermap.data.Geometry intersect(com.supermap.data.Geometry geometry1, com.supermap.data.Geometry geometry2, boolean isDispose)
两个对象求交。
-
intersect
public static com.supermap.data.Geometry intersect(com.supermap.mapping.Layer layer)
将指定图层的选中对象做求交处理
-
union
public static com.supermap.data.Geometry union(com.supermap.data.Geometry geometry1, com.supermap.data.Geometry geometry2, boolean isdispose)
两个对象合并。
-
union
public static com.supermap.data.Geometry union(com.supermap.data.Geometry geometry1, com.supermap.data.Geometry geometry2, java.lang.Double tolerance, boolean isdispose)
-
union
public static com.supermap.data.Geometry union(com.supermap.mapping.Layer layer)
将指定图层的选中对象做合并处理
-
xor
public static com.supermap.data.Geometry xor(com.supermap.data.Geometry geometry1, com.supermap.data.Geometry geometry2, boolean isdispose)
两个对象异或。
-
combination
public static com.supermap.desktop.core.geometry.Abstract.IGeometry combination(com.supermap.desktop.core.geometry.Abstract.IGeometry target, com.supermap.mapping.Layer layer, com.supermap.desktop.core.Interface.IBigDataBusinessUpdateProgress progress)
将指定图层选中的几何对象组合到 geometry 中- 参数:
target
- 指定对象layer
- 指定图层progress
- 进度条- 返回:
- 合并后的Geometry
-
combination
public static com.supermap.desktop.core.geometry.Abstract.IGeometry combination(com.supermap.desktop.core.geometry.Abstract.IGeometry target, com.supermap.mapping.Layer layer)
将指定图层选中的几何对象组合到 geometry 中
-
reverse
public static com.supermap.data.Point2Ds reverse(com.supermap.data.Point2Ds point2Ds)
将指定的 Point2Ds 反序
-
reverse
public static com.supermap.data.Point3Ds reverse(com.supermap.data.Point3Ds point3Ds)
将指定的 Point3Ds 反序
-
releaseGeometry
public static <T extends com.supermap.data.Geometry> T releaseGeometry(T geometry)
销毁对象
-
getGeometryByDatasetType
public static com.supermap.data.Geometry getGeometryByDatasetType(com.supermap.data.DatasetType type)
根据类型创建对应的对象
-
getBounds
public static com.supermap.data.Rectangle2D getBounds(com.supermap.data.Geometry... geometries)
获取对象的总范围- 参数:
geometries
- 对象- 返回:
- 总的范围
-
getPerimeter
public static double getPerimeter(com.supermap.data.Geometry geometry)
根据对象类型获取周长- 参数:
geometry
-- 返回:
-
getVertexCount
public static int getVertexCount(com.supermap.data.Geometry geometry)
获得对象的结点个数- 参数:
geometry
-- 返回:
-
convertToLine
public static com.supermap.data.GeoLine convertToLine(com.supermap.data.Geometry geometry)
-
convertToRegion
public static com.supermap.data.GeoRegion convertToRegion(com.supermap.data.Geometry geometry)
-
convertToLineOrRegion
public static com.supermap.data.Geometry convertToLineOrRegion(com.supermap.data.Geometry geometry)
-
getBounds
public static com.supermap.data.Rectangle2D getBounds(com.supermap.data.Geometry geometry, double tolerance)
-
simplifyGeometryNodes
public static com.supermap.data.Geometry simplifyGeometryNodes(com.supermap.data.Geometry geometry, double tolerance)
-
boundsConvertToGeoRegion
public static com.supermap.data.Geometry boundsConvertToGeoRegion(com.supermap.data.Rectangle2D rectangle2D)
- 参数:
rectangle2D
-- 返回:
-
-