|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kaboum.algorithm.KaboumAlgorithms
public class KaboumAlgorithms
Constructor Summary | |
---|---|
KaboumAlgorithms()
|
Method Summary | |
---|---|
static double |
area2(KaboumCoordinate a,
KaboumCoordinate b,
KaboumCoordinate c)
Compute the magnitude of the cross Product between two Vectors AB and AC. |
static boolean |
autoIntersect(KaboumCoordinate[] internals)
First point and last point MUST be different |
static int |
computeOrientation(KaboumCoordinate p1,
KaboumCoordinate p2,
KaboumCoordinate q)
|
static double |
distance(KaboumCoordinate a,
KaboumCoordinate b)
Compute the Euclidian distance between to point. |
static double |
distance(KaboumCoordinate p,
KaboumCoordinate[] internals)
Compute the distance between a point P and a PolyLine [A1...An]. |
static double |
distance(KaboumCoordinate p,
KaboumCoordinate a,
KaboumCoordinate b)
Compute the distance between a point P and a segment [AB]. |
static double |
distance(KaboumCoordinate p,
KaboumGeometry geometry)
Return the distance between a point and a geometry |
static boolean |
doesPointBorderGeometry(KaboumCoordinate p,
KaboumGeometry geometry,
double precision)
Check if a point is on the border of a GEOMETRY |
static boolean |
doesPointLieInGeometry(KaboumCoordinate p,
KaboumGeometry geometry,
double precision)
Check if a point lies in or near a GEOMETRY |
static boolean |
geometryIntersectsOther(KaboumGeometryGlobalDescriptor ggd,
KaboumGeometryGlobalDescriptor[] ggds)
Check if a geometry intersects other geometries. |
static boolean |
geometryIsInsideOther(KaboumGeometryGlobalDescriptor ggd,
KaboumGeometryGlobalDescriptor[] ggds)
Check if a geometry is inside other geometries. |
static boolean |
geometryIsValid(KaboumGeometry geometry)
Check that a geometry does not intersect with itself. |
static boolean |
geometrySurroundsOther(KaboumGeometryGlobalDescriptor ggd,
KaboumGeometryGlobalDescriptor[] ggds)
Check if a geometry surrounds other geometries. |
static int |
getClosestPointPosition(KaboumCoordinate[] internals,
KaboumCoordinate coord)
Return the position of the closest vertex from an input Coordinate |
static boolean |
inside(KaboumLineString ring1,
KaboumLineString ring2)
Return true if ring2 is inside ring1 |
static boolean |
intersect(KaboumCoordinate a,
KaboumCoordinate b,
KaboumCoordinate c,
KaboumCoordinate d)
Return true if segment [ab] intersects segment [cd] |
static boolean |
intersect(KaboumLineString ring1,
KaboumLineString ring2)
Return true if ring1 and ring2 intersect |
static boolean |
isBetweenAndNotColinear(KaboumCoordinate a,
KaboumCoordinate b,
KaboumCoordinate c)
|
static boolean |
isCCW(KaboumCoordinate[] ring)
This class is a rewrite of isCCW(Coordinate[] ring) from JTS RobustCGAlgorithms class (cf. http://www.vividsolutions.com) |
static boolean |
isColinear(KaboumCoordinate a,
KaboumCoordinate b,
KaboumCoordinate c)
Determine if a point c is colinear with segment [ab]. |
static boolean |
isLeft(KaboumCoordinate a,
KaboumCoordinate b,
KaboumCoordinate c)
Determine if a point c is to the left of segment [ab]. |
static boolean |
isPointInPolygon(KaboumCoordinate p,
KaboumCoordinate[] ring)
This algorithm does not attempt to first check the point against the envelope of the ring. |
static boolean |
isPointInPolygon(KaboumCoordinate p,
KaboumGeometry geometry)
Check if a point is inside a GEOMETRY |
static int |
orientationIndex(KaboumCoordinate p1,
KaboumCoordinate p2,
KaboumCoordinate q)
This class is a rewrite of orientationIndex(Coordinate p1, Coordinate p2, Coordinate q) from JTS RobustCGAlgorithms class (cf. http://www.vividsolution.com) |
static int |
signOfDet2x2(double x1,
double y1,
double x2,
double y2)
RobustDeterminant implements an algorithm to compute the
sign of a 2x2 determinant for double precision values robustly. |
static boolean |
xor(boolean x,
boolean y)
Exclusive or: true if exactly one argument is true (From: "Computational Geometry in C" by Joseph O'Rourke) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KaboumAlgorithms()
Method Detail |
---|
public static int orientationIndex(KaboumCoordinate p1, KaboumCoordinate p2, KaboumCoordinate q)
public static boolean isCCW(KaboumCoordinate[] ring)
public static boolean doesPointLieInGeometry(KaboumCoordinate p, KaboumGeometry geometry, double precision)
public static boolean doesPointBorderGeometry(KaboumCoordinate p, KaboumGeometry geometry, double precision)
public static boolean isPointInPolygon(KaboumCoordinate p, KaboumGeometry geometry)
public static boolean isPointInPolygon(KaboumCoordinate p, KaboumCoordinate[] ring)
ring
- assumed to have first point identical to last pointpublic static int computeOrientation(KaboumCoordinate p1, KaboumCoordinate p2, KaboumCoordinate q)
public static double distance(KaboumCoordinate p, KaboumGeometry geometry)
public static double distance(KaboumCoordinate p, KaboumCoordinate[] internals)
p
- Point PpolyLine
- PolyLine (Polygon representation)
public static double distance(KaboumCoordinate p, KaboumCoordinate a, KaboumCoordinate b)
p
- Point Pa
- Point Ab
- Point B
public static double area2(KaboumCoordinate a, KaboumCoordinate b, KaboumCoordinate c)
a
- Point Ab
- Point Bc
- Point Cpublic static double distance(KaboumCoordinate a, KaboumCoordinate b)
public static int signOfDet2x2(double x1, double y1, double x2, double y2)
RobustDeterminant
implements an algorithm to compute the
sign of a 2x2 determinant for double precision values robustly.
It is a direct translation of code developed by Olivier Devillers.
The original code carries the following copyright notice:
Author : Olivier Devillers Olivier.Devillers@sophia.inria.fr http:/www.inria.fr:/prisme/personnel/devillers/anglais/determinant.html Copyright (c) 1995 by INRIA Prisme Project BP 93 06902 Sophia Antipolis Cedex, France. All rights reserved
public static int getClosestPointPosition(KaboumCoordinate[] internals, KaboumCoordinate coord)
internals
- Vertices listcoord
- Input coordinate (internal representation)public static boolean isBetweenAndNotColinear(KaboumCoordinate a, KaboumCoordinate b, KaboumCoordinate c)
public static boolean isColinear(KaboumCoordinate a, KaboumCoordinate b, KaboumCoordinate c)
a
- Point ab
- Point bc
- Point cpublic static boolean isLeft(KaboumCoordinate a, KaboumCoordinate b, KaboumCoordinate c)
a
- Point ab
- Point bc
- Point cpublic static boolean autoIntersect(KaboumCoordinate[] internals)
public static boolean intersect(KaboumCoordinate a, KaboumCoordinate b, KaboumCoordinate c, KaboumCoordinate d)
public static boolean intersect(KaboumLineString ring1, KaboumLineString ring2)
public static boolean inside(KaboumLineString ring1, KaboumLineString ring2)
public static boolean xor(boolean x, boolean y)
x
- Condition 1y
- Condition 2public static boolean geometryIsValid(KaboumGeometry geometry)
public static boolean geometrySurroundsOther(KaboumGeometryGlobalDescriptor ggd, KaboumGeometryGlobalDescriptor[] ggds)
public static boolean geometryIntersectsOther(KaboumGeometryGlobalDescriptor ggd, KaboumGeometryGlobalDescriptor[] ggds)
public static boolean geometryIsInsideOther(KaboumGeometryGlobalDescriptor ggd, KaboumGeometryGlobalDescriptor[] ggds)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |