PostGIS  2.5.7dev-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)
 
LWPOLYlwpoly_segmentize2d (const 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)
 
LWPOLYlwpoly_force_dims (const LWPOLY *poly, int hasz, int hasm)
 
int lwpoly_is_empty (const LWPOLY *poly)
 
uint32_t lwpoly_count_vertices (LWPOLY *poly)
 
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)