30 #ifndef PAL_GEOM_FUNCTION 31 #define PAL_GEOM_FUNCTION 56 static inline double cross_product(
double x1,
double y1,
double x2,
double y2,
double x3,
double y3 )
58 return ( x2 - x1 ) *( y3 - y1 ) - ( x3 - x1 ) *( y2 - y1 );
61 static inline double dist_euc2d(
double x1,
double y1,
double x2,
double y2 )
63 return sqrt(( x2 - x1 ) *( x2 - x1 ) + ( y2 - y1 ) *( y2 - y1 ) );
66 static inline double dist_euc2d_sq(
double x1,
double y1,
double x2,
double y2 )
68 return ( x2 - x1 ) *( x2 - x1 ) + ( y2 - y1 ) *( y2 - y1 );
71 static void findLineCircleIntersection(
double cx,
double cy,
double radius,
72 double x1,
double y1,
double x2,
double y2,
73 double& xRes,
double& yRes );
84 static int convexHullId(
int *
id,
const double*
const x,
const double*
const y,
int n,
int *&cHull );
89 static bool isSegIntersects(
double x1,
double y1,
double x2,
double y2,
90 double x3,
double y3,
double x4,
double y4 );
96 static bool computeLineIntersection(
double x1,
double y1,
double x2,
double y2,
97 double x3,
double y3,
double x4,
double y4,
98 double *x,
double *y );
101 static int reorderPolygon(
int nbPoints,
double *x,
double *y );
112 static bool containsCandidate(
const GEOSPreparedGeometry* geom,
double x,
double y,
double width,
double height,
double alpha );
static double cross_product(double x1, double y1, double x2, double y2, double x3, double y3)
static double dist_euc2d(double x1, double y1, double x2, double y2)
static double dist_euc2d_sq(double x1, double y1, double x2, double y2)