Package cn.mapway.geo.shared.vector
Class Polygon
java.lang.Object
cn.mapway.geo.shared.vector.GeoObject
cn.mapway.geo.shared.vector.Polygon
- All Implemented Interfaces:
Serializable
Polygon
多边形
- Author:
- zhang
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoid将多边形强制转化为 右手规则 外边框是 逆时针方向 内部是顺时针方向 算法参考 https://github.com/mapbox/geojson-rewind if (rings.length === 0) return;
-
Field Details
-
lines
-
-
Constructor Details
-
Polygon
public Polygon()
-
-
Method Details
-
getExtend
-
forceRightHandRule
public void forceRightHandRule()将多边形强制转化为 右手规则 外边框是 逆时针方向 内部是顺时针方向 算法参考 https://github.com/mapbox/geojson-rewind if (rings.length === 0) return;rewindRing(rings[0], outer); for (var i = 1; i < rings.length; i++) { rewindRing(rings[i], !outer); }