public class Polygon extends VectorElement
swigCMemOwn
构造器和说明 |
---|
Polygon(long cPtr,
boolean cMemoryOwn) |
Polygon(MapPos circlePos,
double rad)
可以用来绘制圆
|
Polygon(MapPos circlePos,
double rad,
PolygonStyle style)
可以用来绘制圆
|
Polygon(MapPosVector poses)
Constructs a Polygon object from a vector of map positions and a style.
|
Polygon(MapPosVector poses,
MapPosVectorVector holes)
Constructs a Polygon object from a vector of map positions, a vector of holes and a style.
|
Polygon(MapPosVector poses,
MapPosVectorVector holes,
PolygonStyle style)
Constructs a Polygon object from a vector of map positions, a vector of holes and a style.
|
Polygon(MapPosVector poses,
PolygonStyle style)
Constructs a Polygon object from a vector of map positions and a style.
|
Polygon(PolygonGeometry geometry)
Constructs a Polygon object from a geometry object and a style.
|
Polygon(PolygonGeometry geometry,
PolygonStyle style)
Constructs a Polygon object from a geometry object and a style.
|
Polygon(java.lang.String wkt)
通过WKT 来生成Polygon
|
Polygon(java.lang.String wkt,
PolygonStyle style)
通过WKT 来生成Polygon
|
Polygon(java.lang.String geoJson,
PolygonStyle style,
Projection proj)
通过GeoJson 生成Polygon
|
限定符和类型 | 方法和说明 |
---|---|
void |
delete() |
protected void |
finalize() |
static long |
getCPtr(Polygon obj) |
PolygonGeometry |
getGeometry()
返回描述矢量元素空间位置的几何对象。
|
MapPosVectorVector |
getHoles()
Returns the holes of the polygon.
|
boolean |
getNearestPointToOutPoint(MapPos outPoint,
MapPos result)
求多边形的边界上到多边形外一点距离最近的点
|
MapPosVector |
getPoses()
Returns the vertices that define this polygon.
|
PolygonStyle |
getStyle()
Returns the style of this polygon.
|
boolean |
isLineSegmentOnEdge(MapPos pos1,
MapPos pos2)
判断一个线段是否在多边形的边界上
|
boolean |
pointInsidePolygon(MapPos point)
判断一个点是否在多边形内部
|
boolean |
polygonsIntersect(Polygon polygon,
VectorElementVector result)
当前多边形与另一多边形求交
|
void |
setGeometry(PolygonGeometry geometry)
Sets the location for this polygon.
|
void |
setHoles(MapPosVectorVector holes)
Sets the holes of the polygon.
|
void |
setPoses(MapPosVector poses)
Sets the vertices that define this polygon.
|
void |
setStyle(PolygonStyle style)
Sets the style for this polygon.
|
boolean |
split(Line line,
VectorElementVector listPolygon,
StringVector strErr) |
static Polygon |
swigCreatePolymorphicInstance(long cPtr,
boolean cMemoryOwn)
Creates a polymorphic instance of the given native object.
|
java.lang.String |
swigGetClassName()
Returns the actual class name of this object.
|
java.lang.Object |
swigGetDirectorObject()
Returns the connected director object.
|
attachTerrain, attachTerrain, autoNotifyElementChanged, equals, getBounds, getCPtr, getId, getInternalElevation, getMetaData, getMetaDataElement, hashCode, hasInternalElevation, isVisible, notifyElementChanged, setId, setMetaData, setMetaDataElement, setVisible
public Polygon(long cPtr, boolean cMemoryOwn)
public Polygon(java.lang.String geoJson, PolygonStyle style, Projection proj)
geoJson
- style
- proj
- public Polygon(java.lang.String wkt, PolygonStyle style)
wkt
- style
- public Polygon(java.lang.String wkt)
wkt
- public Polygon(MapPos circlePos, double rad, PolygonStyle style)
circlePos
- rad
- style
- public Polygon(MapPos circlePos, double rad)
circlePos
- rad
- public Polygon(PolygonGeometry geometry, PolygonStyle style)
geometry
- The geometry object that defines the location and holes of this polygon.style
- The style that defines what this polygon looks like.public Polygon(PolygonGeometry geometry)
geometry
- The geometry object that defines the location and holes of this polygon.public Polygon(MapPosVector poses, PolygonStyle style)
poses
- The vector of map positions that defines the location of this polygon.style
- The style that defines what this polygon looks like.public Polygon(MapPosVector poses)
poses
- The vector of map positions that defines the location of this polygon.public Polygon(MapPosVector poses, MapPosVectorVector holes, PolygonStyle style)
poses
- The vector of map positions that defines the location of this polygon.holes
- The vector of holes that defines the locations of holes of this polygon.style
- The style that defines what this polygon looks like.public Polygon(MapPosVector poses, MapPosVectorVector holes)
poses
- The vector of map positions that defines the location of this polygon.holes
- The vector of holes that defines the locations of holes of this polygon.public static long getCPtr(Polygon obj)
protected void finalize()
finalize
在类中 VectorElement
public void delete()
delete
在类中 VectorElement
public static Polygon swigCreatePolymorphicInstance(long cPtr, boolean cMemoryOwn)
cPtr
- The native pointer of the instance.cMemoryOwn
- The ownership flag.public PolygonGeometry getGeometry()
VectorElement
getGeometry
在类中 VectorElement
public void setGeometry(PolygonGeometry geometry)
geometry
- The new geometry object that defines the location and holes of this polygon.public MapPosVector getPoses()
public void setPoses(MapPosVector poses)
poses
- The new vector of map positions that define this polygon.public MapPosVectorVector getHoles()
public void setHoles(MapPosVectorVector holes)
holes
- The list of holes of the polygon.public PolygonStyle getStyle()
public void setStyle(PolygonStyle style)
style
- The new style that defines what this polygon looks like.public boolean split(Line line, VectorElementVector listPolygon, StringVector strErr)
public boolean polygonsIntersect(Polygon polygon, VectorElementVector result)
polygon
- result
- public boolean pointInsidePolygon(MapPos point)
point
- public boolean getNearestPointToOutPoint(MapPos outPoint, MapPos result)
outPoint
- 多边形外的一个点坐标result
- 边界上最近点的坐标public boolean isLineSegmentOnEdge(MapPos pos1, MapPos pos2)
pos1
- pos2
- public java.lang.String swigGetClassName()
swigGetClassName
在类中 VectorElement
public java.lang.Object swigGetDirectorObject()
swigGetDirectorObject
在类中 VectorElement