new Geometry()
Usage
import { Geometry } from '@supermapgis/iclient-leaflet';
new Geometry();<script type="text/javascript" src="https://iclient.supermap.io/dist/leaflet/iclient-leaflet.js"></script>
<script>
new L.supermap.Geometry({paramsNames});
// 弃用的写法
new SuperMap.Geometry();
</script>
common/commontypes/Geometry.js, line 8
API Relations
As constructor parameter:
FeatureVector
, GeometryCollection
, GeometryMinDistanceAnalystParameters
, Route
, TerrainCutFillCalculationParameters.
As method parameter:
ElasticSearch.setGeoFence
, GeometryCollection.addComponent
, GeometryCollection.addComponents
, GeometryCollection.equals
, GeometryCollection.removeComponent
, GeometryCollection.removeComponents
, GeometryCurve.addComponent
, GeometryCurve.addComponents
, GeometryCurve.equals
, GeometryCurve.removeComponent
, GeometryCurve.removeComponents
, GeometryLinearRing.addComponents
, GeometryLinearRing.equals
, GeometryLinearRing.removeComponents
, GeometryLineString.addComponent
, GeometryLineString.addComponents
, GeometryLineString.equals
, GeometryLineString.removeComponents
, GeometryMultiLineString.addComponent
, GeometryMultiLineString.addComponents
, GeometryMultiLineString.equals
, GeometryMultiLineString.removeComponent
, GeometryMultiLineString.removeComponents
, GeometryMultiPoint.addComponent
, GeometryMultiPoint.addComponents
, GeometryMultiPoint.equals
, GeometryMultiPoint.removeComponent
, GeometryMultiPoint.removeComponents
, GeometryMultiPolygon.addComponent
, GeometryMultiPolygon.addComponents
, GeometryMultiPolygon.equals
, GeometryMultiPolygon.removeComponent
, GeometryMultiPolygon.removeComponents
, GeometryPolygon.addComponent
, GeometryPolygon.addComponents
, GeometryPolygon.equals
, GeometryPolygon.removeComponent
, GeometryPolygon.removeComponents
, Route.addComponent
, Route.addComponents
, Route.equals
, Route.removeComponent
, Route.removeComponents
, ServerGeometry.fromGeometry
, ServerGeometry.IsClockWise
, WKTFormat.extractGeometry.
Returned by:
GeoJSONFormat.parseCoords.box
, GeoJSONFormat.parseCoords.linestring
, GeoJSONFormat.parseCoords.multilinestring
, GeoJSONFormat.parseCoords.multipoint
, GeoJSONFormat.parseCoords.multipolygon
, GeoJSONFormat.parseCoords.point
, GeoJSONFormat.parseCoords.polygon
, Geometry.clone
, GeometryRectangle.clone
, ServerGeometry.toGeoLine
, ServerGeometry.toGeoLineEPS
, ServerGeometry.toGeoLinem
, ServerGeometry.toGeometry
, ServerGeometry.toGeoPoint
, ServerGeometry.toGeoRegion
, ServerGeometry.toGeoRegionEPS.
Subclasses
Members
-
boundsBounds
-
几何对象的范围。
-
idstring
-
几何对象的唯一标识符。
-
parentGeometry
-
父类几何对象。
-
SRIDnumber
-
投影坐标参数。通过该参数,服务器判断几何对象的坐标参考系是否与数据集相同,如果不同,则在数据入库前进行投影变换。
Example
var geometry= new Geometry(); geometry. SRID=4326;
Methods
-
calculateBounds()
common/commontypes/Geometry.js, line 126 -
重新计算几何图形的边界(需要在子类中实现此方法)。
-
clearBounds()
common/commontypes/Geometry.js, line 85 -
清除几何对象的边界。 如果该对象有父类,也会清除父类几何对象的边界。
-
clone(){Geometry}
common/commontypes/Geometry.js, line 63 -
克隆几何图形。克隆的几何图形不设置非标准的属性。
Returns:
Type Description Geometry 克隆的几何图形。 -
destroy()
common/commontypes/Geometry.js, line 52 -
解构 Geometry 类,释放资源。
-
extendBounds(newBounds)
common/commontypes/Geometry.js, line 98 -
扩展现有边界以包含新边界。如果尚未设置几何边界,则设置新边界。
Name Type Description newBoundsBounds 几何对象的边界。
-
getArea(){number}
common/commontypes/Geometry.js, line 145 -
计算几何对象的面积 ,此方法需要在子类中定义。
Returns:
Type Description number 计算后的对象面积。 -
getBounds(){Bounds}
common/commontypes/Geometry.js, line 113 -
获得几何图形的边界。如果没有设置边界,可通过计算获得。
Returns:
Type Description Bounds 几何对象的边界。 -
getVertices(nodes){Array}
common/commontypes/Geometry.js, line 136 -
返回几何图形的所有顶点的列表(需要在子类中实现此方法)。
Name Type Description nodesboolean 可选 如果是 true,线则只返回线的末端点,如果 false,仅仅返回顶点,如果没有设置,则返回顶点。
Returns:
Type Description Array 几何图形的顶点列表。 -
setBounds(bounds)
common/commontypes/Geometry.js, line 73 -
设置几何对象的边界。
Name Type Description boundsBounds 范围。