PostGIS  2.4.9dev-r@@SVN_REVISION@@
lwpoly.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "liblwgeom_internal.h"
#include "lwgeom_log.h"
Include dependency graph for lwpoly.c:

Go to the source code of this file.

Macros

#define CHECK_POLY_RINGS_ZM   1
 

Functions

LWPOLYlwpoly_construct (int srid, GBOX *bbox, uint32_t nrings, POINTARRAY **points)
 
LWPOLYlwpoly_construct_rectangle (char hasz, char hasm, POINT4D *p1, POINT4D *p2, POINT4D *p3, POINT4D *p4)
 
LWPOLYlwpoly_construct_envelope (int srid, double x1, double y1, double x2, double y2)
 
LWPOLYlwpoly_construct_circle (int srid, double x, double y, double radius, uint32_t segments_per_quarter, char exterior)
 
LWPOLYlwpoly_construct_empty (int srid, char hasz, char hasm)
 
void lwpoly_free (LWPOLY *poly)
 
void printLWPOLY (LWPOLY *poly)
 
LWPOLYlwpoly_clone (const LWPOLY *g)
 
LWPOLYlwpoly_clone_deep (const LWPOLY *g)
 
int lwpoly_add_ring (LWPOLY *poly, POINTARRAY *pa)
 Add a ring to a polygon. More...
 
void lwpoly_force_clockwise (LWPOLY *poly)
 
int lwpoly_is_clockwise (LWPOLY *poly)
 
void lwpoly_release (LWPOLY *lwpoly)
 
void lwpoly_reverse (LWPOLY *poly)
 
LWPOLYlwpoly_segmentize2d (LWPOLY *poly, double dist)
 
char lwpoly_same (const LWPOLY *p1, const LWPOLY *p2)
 
LWPOLYlwpoly_from_lwlines (const LWLINE *shell, uint32_t nholes, const LWLINE **holes)
 
LWGEOMlwpoly_remove_repeated_points (const LWPOLY *poly, double tolerance)
 
LWPOLYlwpoly_force_dims (const LWPOLY *poly, int hasz, int hasm)
 
int lwpoly_is_empty (const LWPOLY *poly)
 
int lwpoly_count_vertices (LWPOLY *poly)
 
LWPOLYlwpoly_simplify (const LWPOLY *ipoly, double dist, int preserve_collapsed)
 
double lwpoly_area (const LWPOLY *poly)
 Find the area of the outer ring - sum (area of inner rings). More...
 
double lwpoly_perimeter (const LWPOLY *poly)
 Compute the sum of polygon rings length. More...
 
double lwpoly_perimeter_2d (const LWPOLY *poly)
 Compute the sum of polygon rings length (forcing 2d computation). More...
 
int lwpoly_is_closed (const LWPOLY *poly)
 
int lwpoly_startpoint (const LWPOLY *poly, POINT4D *pt)
 
int lwpoly_contains_point (const LWPOLY *poly, const POINT2D *pt)
 
LWPOLYlwpoly_grid (const LWPOLY *poly, const gridspec *grid)