PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ ptarray_is_closed_3d()

int ptarray_is_closed_3d ( const POINTARRAY in)

Definition at line 706 of file ptarray.c.

707 {
708  if (!in)
709  {
710  lwerror("ptarray_is_closed_3d: called with null point array");
711  return 0;
712  }
713  if (in->npoints <= 1 ) return in->npoints; /* single-point are closed, empty not closed */
714 
715  return 0 == memcmp(getPoint_internal(in, 0), getPoint_internal(in, in->npoints-1), sizeof(POINT3D) );
716 }
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:190
static uint8_t * getPoint_internal(const POINTARRAY *pa, uint32_t n)
Definition: lwinline.h:67
uint32_t npoints
Definition: liblwgeom.h:413

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

Referenced by lwcircstring_is_closed(), lwline_is_closed(), lwpoly_is_closed(), lwtriangle_from_lwline(), parse_gml_linearring(), parse_gml_patch(), parse_gml_polygon(), parse_gml_triangle(), parse_kml_polygon(), and ptarray_is_closed_z().

Here is the call graph for this function:
Here is the caller graph for this function: