public class GeoComputation extends Object
| 构造器 | 说明 |
|---|---|
GeoComputation() |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
static double |
calArea(List<PointD> points) |
Get polygon area on earth surface
|
static List<Shape> |
clipLayer(VectorLayer subjectLayer,
Object clipObject) |
Clip a vector layer by a polygon shape
|
static VectorLayer |
clipLayer(VectorLayer subjectLayer,
List<Object> clipObjects) |
Clip a vector layer by polygon shape list
|
static PointShape |
clipPointShape(PointShape aPS,
Object clipObj) |
Clip point shape with a clipping object
|
static PolygonShape |
clipPolygonShape(PolygonShape aPGS,
Object clipObj) |
Clip polygon shape with a clipping object
|
static PolygonShape |
clipPolygonShape_Lat(PolygonShape aPGS,
double lat) |
Clip polygon shape with a latitude
|
static PolygonShape |
clipPolygonShape_Lat(PolygonShape aPGS,
double lat,
boolean isTop) |
Clip polygon shape with a latitude
|
static PolygonShape |
clipPolygonShape_Lon(PolygonShape aPGS,
double lon) |
Clip polygon shape with a longitude
|
static PolylineShape |
clipPolylineShape(PolylineShape aPLS,
Object clipObj) |
Clip polyline shape with a clipping object
|
static PolylineShape |
clipPolylineShape_Lat(PolylineShape aPLS,
double lat) |
Clip polyline shape with a longitude
|
static PolylineShape |
clipPolylineShape_Lat(PolylineShape aPLS,
double lat,
boolean isTop) |
Clip polyline shape with a longitude
|
static PolylineShape |
clipPolylineShape_Lon(PolylineShape aPLS,
double lon) |
Clip polyline shape with a longitude
|
static Shape |
clipShape(Shape aShape,
Object clipObj) |
Clip a shape
|
static double |
crossProduct(PointD p1,
PointD p2,
PointD p3) |
Finds the cross product of the 2 vectors created by the 3 vertices.
|
static double |
dis_PointToLine(PointD point,
PointD pt1,
PointD pt2) |
Calculate the distance between point and a line segment
|
static double |
distance(PointD pt1,
PointD pt2) |
Get distance between two points
|
static double |
getArea(List<? extends PointD> points) |
Get polygon area on earth surface
|
static double |
getArea(List<? extends PointD> points,
boolean isLonLat) |
Get polygon area on earth surface
|
static double |
getArea(List<Number> x,
List<Number> y,
boolean isLonLat) |
Get polygon area
|
static double |
getDistance(List<? extends PointD> points,
boolean isLonLat) |
Get distance
|
static double |
getDistance(List<Number> xx,
List<Number> yy,
boolean isLonLat) |
Get distance
|
static List<GridLabel> |
getGridLabels(Polyline inPolyLine,
Extent clipExtent,
boolean isVertical) |
Get grid labels of a polyline
|
static List<GridLabel> |
getGridLabels_StraightLine(Polyline inPolyLine,
Extent clipExtent,
boolean isVertical) |
Get grid labels of a straight line
|
static double |
haversine(double x) |
Haversine function : hav(x) = (1-cos(x))/2
|
static boolean |
isClockwise(List<? extends PointD> pointList) |
Determine if a point array is clockwise
|
static boolean |
isClockwise(PointD[] points) |
Determine if a point array is clockwise
|
static boolean |
pointInPolygon(List<? extends PointD> poly,
PointD aPoint) |
Determine if a point is in a polygon
|
static boolean |
pointInPolygon(Polygon aPolygon,
PointD aPoint) |
Determine if a point is in a polygon
|
static boolean |
pointInPolygon(PolygonShape aPolygon,
double x,
double y) |
Determine if a point is in a polygon
|
static boolean |
pointInPolygon(PolygonShape aPolygon,
PointD aPoint) |
Determine if a point is in a polygon
|
static boolean |
pointInPolygonLayer(VectorLayer aLayer,
PointD aPoint,
boolean onlySel) |
Determine if a point loacted in a polygon layer
|
static boolean |
pointInPolygons(List<PolygonShape> polygons,
PointD aPoint) |
Determine if a point located in polygons
|
static double |
pointProduct(PointD p1,
PointD p2,
PointD p3) |
Finds the point product of the 2 vectors created by the 3 vertices.
|
static Object |
selectPolyline(PointD sp,
List<PointD> points,
double buffer) |
Select polyline shape by a point
|
static Object |
selectPolylineShape(PointD sp,
PolylineShape aPLS,
double buffer) |
Select polyline shape by a point
|
static double |
sphericalPolygonArea(double[] lat,
double[] lon,
double r) |
Compute the Area of a Spherical Polygon
|
static double |
sphericalPolygonArea(List<? extends PointD> points) |
Compute the Area of a Spherical Polygon
|
static double |
sphericalPolygonArea(List<? extends PointD> points,
double r) |
Compute the Area of a Spherical Polygon
|
public static boolean isClockwise(List<? extends PointD> pointList)
pointList - point listpublic static boolean isClockwise(PointD[] points)
points - point arraypublic static boolean pointInPolygon(List<? extends PointD> poly, PointD aPoint)
poly - Polygon border pointsaPoint - The pointpublic static boolean pointInPolygon(PolygonShape aPolygon, PointD aPoint)
aPolygon - The polygonaPoint - The pointpublic static boolean pointInPolygon(PolygonShape aPolygon, double x, double y)
aPolygon - The polygonx - Xy - Ypublic static boolean pointInPolygon(Polygon aPolygon, PointD aPoint)
aPolygon - The polygonaPoint - The pointpublic static boolean pointInPolygons(List<PolygonShape> polygons, PointD aPoint)
polygons - The polygonsaPoint - The pointpublic static boolean pointInPolygonLayer(VectorLayer aLayer, PointD aPoint, boolean onlySel)
aLayer - The polygon layeraPoint - The pointonlySel - If check only selected shapespublic static double dis_PointToLine(PointD point, PointD pt1, PointD pt2)
point - The pointpt1 - End point of the line segmentpt2 - End point of the line segmentpublic static double distance(PointD pt1, PointD pt2)
pt1 - Point onept2 - Point twopublic static Object selectPolylineShape(PointD sp, PolylineShape aPLS, double buffer)
sp - The pointaPLS - The polyline shapebuffer - Bufferpublic static Object selectPolyline(PointD sp, List<PointD> points, double buffer)
sp - The pointpoints - The point listbuffer - Bufferpublic static double getArea(List<Number> x, List<Number> y, boolean isLonLat)
x - X coordinatesy - Y coordinatesisLonLat - If is on earth surface (lon/lat)public static double getArea(List<? extends PointD> points, boolean isLonLat)
points - point listisLonLat - if is lon/latpublic static double getArea(List<? extends PointD> points)
points - point listpublic static double calArea(List<PointD> points)
points - point listpublic static double sphericalPolygonArea(List<? extends PointD> points)
points - lon/lat point listpublic static double sphericalPolygonArea(List<? extends PointD> points, double r)
points - lon/lat point listr - spherical radiuspublic static double haversine(double x)
x - public static double sphericalPolygonArea(double[] lat,
double[] lon,
double r)
lat - the latitudes of all vertices(in radian)lon - the longitudes of all vertices(in radian)r - spherical radiuspublic static double getDistance(List<? extends PointD> points, boolean isLonLat)
points - Point listisLonLat - If is lon/latpublic static double getDistance(List<Number> xx, List<Number> yy, boolean isLonLat)
xx - X coordinatesyy - Y coordinatesisLonLat - If is lon/latpublic static List<Shape> clipLayer(VectorLayer subjectLayer, Object clipObject)
subjectLayer - Subject vector layerclipObject - Cipping objectpublic static VectorLayer clipLayer(VectorLayer subjectLayer, List<Object> clipObjects)
subjectLayer - Subject vector layerclipObjects - Cipping object listpublic static Shape clipShape(Shape aShape, Object clipObj)
aShape - The shapeclipObj - Clipping objectpublic static PointShape clipPointShape(PointShape aPS, Object clipObj)
aPS - The point shapeclipObj - Clipping objectpublic static PolylineShape clipPolylineShape(PolylineShape aPLS, Object clipObj)
aPLS - The polyline shapeclipObj - Clipping objectpublic static PolylineShape clipPolylineShape_Lon(PolylineShape aPLS, double lon)
aPLS - Polyline shapelon - Longitudepublic static PolylineShape clipPolylineShape_Lat(PolylineShape aPLS, double lat)
aPLS - Polyline shapelat - The latitudepublic static PolylineShape clipPolylineShape_Lat(PolylineShape aPLS, double lat, boolean isTop)
aPLS - Polyline shapelat - LatitudeisTop - If is toppublic static PolygonShape clipPolygonShape(PolygonShape aPGS, Object clipObj)
aPGS - Polygon shapeclipObj - Clipping objectpublic static PolygonShape clipPolygonShape_Lon(PolygonShape aPGS, double lon)
aPGS - Polygon shapelon - Longitudepublic static PolygonShape clipPolygonShape_Lat(PolygonShape aPGS, double lat)
aPGS - Polygon shapelat - Latitudepublic static PolygonShape clipPolygonShape_Lat(PolygonShape aPGS, double lat, boolean isTop)
aPGS - Polygon shapelat - LatitudeisTop - If is toppublic static double crossProduct(PointD p1, PointD p2, PointD p3)
p1 - Point 1p2 - Point 2p3 - Piont 3public static double pointProduct(PointD p1, PointD p2, PointD p3)
p1 - Point 1p2 - Point 2p3 - Piont 3public static List<GridLabel> getGridLabels(Polyline inPolyLine, Extent clipExtent, boolean isVertical)
inPolyLine - PolylineclipExtent - Clipping objectisVertical - If is verticalCopyright © 2019. All rights reserved.