PostGIS  2.1.10dev-r@@SVN_REVISION@@
int ptarray_is_closed ( const POINTARRAY in)

Check for ring closure using whatever dimensionality is declared on the pointarray.

Definition at line 665 of file ptarray.c.

References getPoint_internal(), POINTARRAY::npoints, and ptarray_point_size().

Referenced by lwtriangle_from_wkb_state(), and wkt_parser_triangle_new().

666 {
667  return 0 == memcmp(getPoint_internal(in, 0), getPoint_internal(in, in->npoints-1), ptarray_point_size(in));
668 }
int ptarray_point_size(const POINTARRAY *pa)
Definition: ptarray.c:41
int npoints
Definition: liblwgeom.h:327
uint8_t * getPoint_internal(const POINTARRAY *pa, int n)
Definition: ptarray.c:1645

Here is the call graph for this function:

Here is the caller graph for this function: