类 GeometryUtil
- java.lang.Object
-
- org.meteoinfo.geoprocess.GeometryUtil
-
public class GeometryUtil extends java.lang.Object- 作者:
- wyq
-
-
构造器概要
构造器 构造器 说明 GeometryUtil()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static PolygonShapeconvexHull(Array x, Array y)Computes the smallest convexPolygonthat contains all the pointsstatic java.util.List<PointD>getEllipseCoordinates(double x0, double y0, double a, double b)Get ellipse coordinatesstatic java.util.List<PointD>getEllipseCoordinates(double x0, double y0, double a, double b, double deltaAngle)Get ellipse coordinatesstatic PointDgetEllipseXY(double x0, double y0, double a, double b, double angle)Get ellipse coordinatestatic ArrayinPolygon(Array a, java.util.List<java.lang.Number> x, java.util.List<java.lang.Number> y, java.util.List<java.lang.Number> x_p, java.util.List<java.lang.Number> y_p)In polygon functionstatic ArrayinPolygon(Array a, java.util.List<java.lang.Number> x, java.util.List<java.lang.Number> y, java.util.List<PolygonShape> polygons)In polygon functionstatic ArrayinPolygon(Array a, java.util.List<java.lang.Number> x, java.util.List<java.lang.Number> y, VectorLayer layer)In polygon functionstatic ArrayinPolygon(Array a, java.util.List<java.lang.Number> x, java.util.List<java.lang.Number> y, PolygonShape ps)In polygon functionstatic ArrayinPolygon(Array x, Array y, java.util.List<PolygonShape> polygons)In polygon functionstatic ArrayinPolygon(Array x, Array y, Array x_p, Array y_p)In polygon functionstatic booleanisConvex(java.util.List<? extends PointD> points)Check if a polygon is convexstatic booleanisConvex(Polygon polygon)Check if a polygon is convexstatic Arraymaskin(Array a, Array m)Maskin functionstatic Arraymaskin(Array a, Array x, Array y, java.util.List<PolygonShape> polygons)Maskin functionstatic Array[]maskin_Remove(Array a, Array x, Array y, java.util.List<PolygonShape> polygons)Maskin functionstatic Arraymaskout(Array a, java.util.List<java.lang.Number> x, java.util.List<java.lang.Number> y, java.util.List<PolygonShape> polygons)Maskout functionstatic Arraymaskout(Array a, java.util.List<java.lang.Number> x, java.util.List<java.lang.Number> y, java.util.List<PolygonShape> polygons, java.lang.Number missingValue)Maskout functionstatic Arraymaskout(Array a, java.util.List<java.lang.Number> x, java.util.List<java.lang.Number> y, VectorLayer layer, java.lang.Number missingValue)Maskout functionstatic Arraymaskout(Array a, java.util.List<java.lang.Number> x, java.util.List<java.lang.Number> y, PolygonShape polygon, java.lang.Number missingValue)Maskout functionstatic Arraymaskout(Array a, Array m)Maskout functionstatic Arraymaskout(Array a, Array m, java.lang.Number missingValue)Maskout functionstatic Arraymaskout(Array a, Array x, Array y, java.util.List<PolygonShape> polygons)Maskout functionstatic Array[]maskout_Remove(Array a, Array x, Array y, java.util.List<PolygonShape> polygons)Maskout function
-
-
-
方法详细资料
-
getEllipseXY
public static PointD getEllipseXY(double x0, double y0, double a, double b, double angle)
Get ellipse coordinate- 参数:
x0- Center xy0- Center ya- Major axisb- Minor axisangle- Angle- 返回:
- Coordinate on the ellipse
-
getEllipseCoordinates
public static java.util.List<PointD> getEllipseCoordinates(double x0, double y0, double a, double b, double deltaAngle)
Get ellipse coordinates- 参数:
x0- Center xy0- Center ya- Major axisb- Minor axisdeltaAngle- Delta angle- 返回:
- Coordinate on the ellipse
-
getEllipseCoordinates
public static java.util.List<PointD> getEllipseCoordinates(double x0, double y0, double a, double b)
Get ellipse coordinates- 参数:
x0- Center xy0- Center ya- Major axisb- Minor axis- 返回:
- Coordinate on the ellipse
-
convexHull
public static PolygonShape convexHull(Array x, Array y)
Computes the smallest convexPolygonthat contains all the points- 参数:
x- X arrayy- Y array- 返回:
- PolygonShape
-
inPolygon
public static Array inPolygon(Array a, java.util.List<java.lang.Number> x, java.util.List<java.lang.Number> y, VectorLayer layer)
In polygon function- 参数:
a- Array ax- X dimension valuesy- Y dimension valueslayer- Polygon vector layer- 返回:
- Result array with cell values of 1 inside polygons and -1 outside polygons
-
inPolygon
public static Array inPolygon(Array a, java.util.List<java.lang.Number> x, java.util.List<java.lang.Number> y, PolygonShape ps)
In polygon function- 参数:
a- Array ax- X dimension valuesy- Y dimension valuesps- Polygon shape- 返回:
- Result array with cell values of 1 inside polygons and -1 outside polygons
-
inPolygon
public static Array inPolygon(Array a, java.util.List<java.lang.Number> x, java.util.List<java.lang.Number> y, java.util.List<PolygonShape> polygons)
In polygon function- 参数:
a- Array ax- X dimension valuesy- Y dimension valuespolygons- PolygonShape list- 返回:
- Result array with cell values of 1 inside polygons and -1 outside polygons
-
inPolygon
public static Array inPolygon(Array x, Array y, java.util.List<PolygonShape> polygons)
In polygon function- 参数:
x- X coordinatesy- Y coordinatespolygons- PolygonShape list- 返回:
- Result boolean array
-
inPolygon
public static Array inPolygon(Array a, java.util.List<java.lang.Number> x, java.util.List<java.lang.Number> y, java.util.List<java.lang.Number> x_p, java.util.List<java.lang.Number> y_p)
In polygon function- 参数:
a- Array ax- X dimension valuesy- Y dimension valuesx_p- X coordinate of the polygony_p- Y coordinate of the polygon- 返回:
- Result array with cell values of 1 inside polygons and -1 outside polygons
-
inPolygon
public static Array inPolygon(Array x, Array y, Array x_p, Array y_p)
In polygon function- 参数:
x- X coordinatesy- Y coordinatesx_p- X coordinate of the polygony_p- Y coordinate of the polygon- 返回:
- Result boolean array
-
maskout
public static Array maskout(Array a, java.util.List<java.lang.Number> x, java.util.List<java.lang.Number> y, VectorLayer layer, java.lang.Number missingValue)
Maskout function- 参数:
a- Array ax- X dimension valuesy- Y dimension valueslayer- VectorLayermissingValue- Missing value- 返回:
- Result array with cell values of missing outside polygons
-
maskout
public static Array maskout(Array a, java.util.List<java.lang.Number> x, java.util.List<java.lang.Number> y, PolygonShape polygon, java.lang.Number missingValue)
Maskout function- 参数:
a- Array ax- X dimension valuesy- Y dimension valuespolygon- Polygon shapemissingValue- Missing value- 返回:
- Result array with cell values of missing outside polygons
-
maskout
public static Array maskout(Array a, Array x, Array y, java.util.List<PolygonShape> polygons)
Maskout function- 参数:
a- Array ax- X Arrayy- Y Arraypolygons- Polygons for maskout- 返回:
- Result array with cell values of missing outside polygons
-
maskin
public static Array maskin(Array a, Array x, Array y, java.util.List<PolygonShape> polygons)
Maskin function- 参数:
a- Array ax- X Arrayy- Y Arraypolygons- Polygons for maskin- 返回:
- Result array with cell values of missing inside polygons
-
maskout_Remove
public static Array[] maskout_Remove(Array a, Array x, Array y, java.util.List<PolygonShape> polygons)
Maskout function- 参数:
a- Array ax- X Arrayy- Y Arraypolygons- Polygons for maskout- 返回:
- Result arrays removing cells outside polygons
-
maskin_Remove
public static Array[] maskin_Remove(Array a, Array x, Array y, java.util.List<PolygonShape> polygons)
Maskin function- 参数:
a- Array ax- X Arrayy- Y Arraypolygons- Polygons for maskin- 返回:
- Result arrays removing cells inside polygons
-
maskout
public static Array maskout(Array a, java.util.List<java.lang.Number> x, java.util.List<java.lang.Number> y, java.util.List<PolygonShape> polygons)
Maskout function- 参数:
a- Array ax- X dimension valuesy- Y dimension valuespolygons- PolygonShape list- 返回:
- Result array with cell values of missing outside polygons
-
maskout
public static Array maskout(Array a, java.util.List<java.lang.Number> x, java.util.List<java.lang.Number> y, java.util.List<PolygonShape> polygons, java.lang.Number missingValue)
Maskout function- 参数:
a- Array ax- X dimension valuesy- Y dimension valuespolygons- PolygonShape listmissingValue- Missing value- 返回:
- Result array with cell values of missing outside polygons
-
maskout
public static Array maskout(Array a, Array m, java.lang.Number missingValue)
Maskout function- 参数:
a- Array am- Array maskmissingValue- Missing value- 返回:
- Result array
-
maskout
public static Array maskout(Array a, Array m)
Maskout function- 参数:
a- Array am- Array mask- 返回:
- Result array
-
maskin
public static Array maskin(Array a, Array m)
Maskin function- 参数:
a- Array am- Array mask- 返回:
- Result array
-
isConvex
public static boolean isConvex(java.util.List<? extends PointD> points)
Check if a polygon is convex- 参数:
points- Outline point of the polygon- 返回:
- Is convex or not
-
isConvex
public static boolean isConvex(Polygon polygon)
Check if a polygon is convex- 参数:
polygon- The polygon- 返回:
- Is convex or not
-
-