mirror of
https://git.osgeo.org/gitea/postgis/postgis
synced 2024-10-25 01:22:47 +00:00
Add ptarray_isclosed3d function
git-svn-id: http://svn.osgeo.org/postgis/trunk@4670 b70326c6-7e19-0410-871a-916f4a2858ee
This commit is contained in:
parent
693e9c398e
commit
f97acc13d3
|
@ -1372,6 +1372,7 @@ extern POINTARRAY *ptarray_addPoint(POINTARRAY *pa, uchar *p, size_t pdims,
|
|||
extern POINTARRAY *ptarray_removePoint(POINTARRAY *pa, unsigned int where);
|
||||
|
||||
extern int ptarray_isclosed2d(const POINTARRAY *pa);
|
||||
extern int ptarray_isclosed3d(const POINTARRAY *pa);
|
||||
|
||||
extern void ptarray_longitude_shift(POINTARRAY *pa);
|
||||
|
||||
|
|
|
@ -378,6 +378,13 @@ ptarray_isclosed2d(const POINTARRAY *in)
|
|||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
ptarray_isclosed3d(const POINTARRAY *in)
|
||||
{
|
||||
if ( memcmp(getPoint_internal(in, 0), getPoint_internal(in, in->npoints-1), sizeof(POINT3D)) ) return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief calculate the #BOX3D bounding box of a set of points
|
||||
* @return a lwalloced #BOX3D, or NULL on empty array.
|
||||
|
|
Loading…
Reference in a new issue