PostGIS  2.4.9dev-r@@SVN_REVISION@@
lwalgorithm.c File Reference
#include "liblwgeom_internal.h"
#include "lwgeom_log.h"
#include <ctype.h>
Include dependency graph for lwalgorithm.c:

Go to the source code of this file.

Functions

int p4d_same (const POINT4D *p1, const POINT4D *p2)
 
int p3d_same (const POINT3D *p1, const POINT3D *p2)
 
int p2d_same (const POINT2D *p1, const POINT2D *p2)
 
int lw_segment_side (const POINT2D *p1, const POINT2D *p2, const POINT2D *q)
 lw_segment_side() More...
 
double lw_seg_length (const POINT2D *A1, const POINT2D *A2)
 Returns the length of a linear segment. More...
 
int lw_pt_in_arc (const POINT2D *P, const POINT2D *A1, const POINT2D *A2, const POINT2D *A3)
 Returns true if P is on the same side of the plane partition defined by A1/A3 as A2 is. More...
 
int lw_pt_in_seg (const POINT2D *P, const POINT2D *A1, const POINT2D *A2)
 Returns true if P is between A1/A2. More...
 
int lw_arc_is_pt (const POINT2D *A1, const POINT2D *A2, const POINT2D *A3)
 Returns true if arc A is actually a point (all vertices are the same) . More...
 
double lw_arc_length (const POINT2D *A1, const POINT2D *A2, const POINT2D *A3)
 Returns the length of a circular arc segment. More...
 
int lw_arc_side (const POINT2D *A1, const POINT2D *A2, const POINT2D *A3, const POINT2D *Q)
 
double lw_arc_center (const POINT2D *p1, const POINT2D *p2, const POINT2D *p3, POINT2D *result)
 Determines the center of the circle defined by the three given points. More...
 
int pt_in_ring_2d (const POINT2D *p, const POINTARRAY *ring)
 
static int lw_seg_interact (const POINT2D *p1, const POINT2D *p2, const POINT2D *q1, const POINT2D *q2)
 
int lw_segment_intersects (const POINT2D *p1, const POINT2D *p2, const POINT2D *q1, const POINT2D *q2)
 returns the kind of CG_SEGMENT_INTERSECTION_TYPE behavior of lineseg 1 (constructed from p1 and p2) and lineseg 2 (constructed from q1 and q2) More...
 
int lwline_crossing_direction (const LWLINE *l1, const LWLINE *l2)
 lwline_crossing_direction: returns the kind of CG_LINE_CROSS_TYPE behavior of 2 linestrings More...
 
char * geohash_point (double longitude, double latitude, int precision)
 
unsigned int geohash_point_as_int (POINT2D *pt)
 
void decode_geohash_bbox (char *geohash, double *lat, double *lon, int precision)
 
int lwgeom_geohash_precision (GBOX bbox, GBOX *bounds)
 
char * lwgeom_geohash (const LWGEOM *lwgeom, int precision)
 Calculate the GeoHash (http://geohash.org) string for a geometry. More...
 

Variables

static char * base32 = "0123456789bcdefghjkmnpqrstuvwxyz"