类 PolygonShape
- java.lang.Object
-
- org.meteoinfo.shape.Shape
-
- org.meteoinfo.shape.PolygonShape
-
- 所有已实现的接口:
java.lang.Cloneable
- 直接已知子类:
ArcShape,CircleShape,CurvePolygonShape,EllipseShape,PolygonMShape,PolygonZShape,RectangleShape
public class PolygonShape extends Shape implements java.lang.Cloneable
PolygonShape class- 作者:
- Yaqiang Wang
-
-
构造器概要
构造器 构造器 说明 PolygonShape()ConstructorPolygonShape(org.locationtech.jts.geom.Geometry geometry)Constructor
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 intaddHole(java.util.List<? extends PointD> points)Add a hole lineintaddHole(java.util.List<? extends PointD> points, int polygonIdx)Add a hole linevoidaddVertice(int vIdx, PointD vertice)Add a verticejava.lang.Objectclone()Clonejava.lang.Objectclone_back()voidcloneValue(Shape other)ConstructorShapedifference(Shape b)Get difference shapedoublegetArea()Get areaintgetPartIndex(int vIdx)Get part indexintgetPartNum()Get part numberint[]getParts()Get partsintgetPointNum()Get point numberjava.util.List<? extends PointD>getPoints()Get pointsjava.util.List<? extends Polygon>getPolygons()Get polygonsShapeTypesgetShapeType()Get shape typedoublegetSphericalArea()Get spherical areavoidremoveHole(int polygonIdx, int holeIdx)Remove a holevoidremoveVerice(int vIdx)Remove a verticevoidreverse()Reverse points directionvoidsetPartNum(int value)Set part numbervoidsetParts(int[] value)Set partsvoidsetPoints(java.util.List<? extends PointD> points)Set pointsvoidsetPoints(PointF[] points)voidsetPoints_keep(PointF[] points)Set points and keep the polygonsvoidsetPolygons(java.util.List<Polygon> polygons)Set polygonsorg.locationtech.jts.geom.GeometrytoGeometry(org.locationtech.jts.geom.GeometryFactory factory)To geometry methodprotected voidupdatePolygons()protected voidupdatePolygons_keep()PolygonShapevalueClone()Clone polygon shape with values-
从类继承的方法 org.meteoinfo.shape.Shape
buffer, contains, convexHull, coveredBy, covers, crosses, disjoint, equals, geometry2Shape, getExtent, getLegendIndex, getValue, intersection, intersects, isEditing, isSelected, isVisible, move, moveVertice, overlaps, reform, setEditing, setExtent, setLegendIndex, setSelected, setValue, setVisible, split, symDifference, toGeometry, touches, union, within
-
-
-
-
方法详细资料
-
getShapeType
public ShapeTypes getShapeType()
从类复制的说明:ShapeGet shape type- 指定者:
getShapeType在类中Shape- 返回:
- Shape type
-
toGeometry
public org.locationtech.jts.geom.Geometry toGeometry(org.locationtech.jts.geom.GeometryFactory factory)
To geometry method- 指定者:
toGeometry在类中Shape- 参数:
factory- GeometryFactory- 返回:
- Geometry
-
getPoints
public java.util.List<? extends PointD> getPoints()
Get points
-
setPoints
public void setPoints(java.util.List<? extends PointD> points)
Set points
-
setPoints_keep
public void setPoints_keep(PointF[] points)
Set points and keep the polygons- 参数:
points-
-
setPoints
public void setPoints(PointF[] points)
- 参数:
points-
-
getPartNum
public int getPartNum()
Get part number- 返回:
- Part number
-
setPartNum
public void setPartNum(int value)
Set part number- 参数:
value- Part number
-
getParts
public int[] getParts()
Get parts- 返回:
- Parts
-
setParts
public void setParts(int[] value)
Set parts- 参数:
value- Parts
-
getPointNum
public int getPointNum()
Get point number- 返回:
- Point number
-
getPolygons
public java.util.List<? extends Polygon> getPolygons()
Get polygons- 返回:
- polygon list
-
setPolygons
public void setPolygons(java.util.List<Polygon> polygons)
Set polygons- 参数:
polygons- polygon list
-
getArea
public double getArea()
Get area- 返回:
- area
-
getSphericalArea
public double getSphericalArea()
Get spherical area- 返回:
- spherical area
-
updatePolygons_keep
protected void updatePolygons_keep()
-
updatePolygons
protected void updatePolygons()
-
addHole
public int addHole(java.util.List<? extends PointD> points)
Add a hole line- 参数:
points- Hole points- 返回:
- Hole index
-
addHole
public int addHole(java.util.List<? extends PointD> points, int polygonIdx)
Add a hole line- 参数:
points- point listpolygonIdx- polygon index- 返回:
- Hole index
-
removeHole
public void removeHole(int polygonIdx, int holeIdx)Remove a hole- 参数:
polygonIdx- Polygon indexholeIdx- Hole index
-
getPartIndex
public int getPartIndex(int vIdx)
Get part index- 参数:
vIdx- The vertice index- 返回:
- Part index
-
addVertice
public void addVertice(int vIdx, PointD vertice)Add a vertice- 覆盖:
addVertice在类中Shape- 参数:
vIdx- Vertice indexvertice- The vertice
-
removeVerice
public void removeVerice(int vIdx)
Remove a vertice- 覆盖:
removeVerice在类中Shape- 参数:
vIdx- Vertice index
-
clone_back
public java.lang.Object clone_back()
-
valueClone
public PolygonShape valueClone()
Clone polygon shape with values- 返回:
- new polygon shape
-
cloneValue
public void cloneValue(Shape other)
Constructor- 覆盖:
cloneValue在类中Shape- 参数:
other- Other polygon shape
-
difference
public Shape difference(Shape b)
Get difference shape- 覆盖:
difference在类中Shape- 参数:
b- Other shape- 返回:
- Difference shape
-
-