30 #if PARANOIA_LEVEL > 0
37 double hside = p2->
x - p1->
x;
38 double vside = p2->
y - p1->
y;
40 return hside * hside + vside * vside;
46 double hside = p2->
x - p1->
x;
47 double vside = p2->
y - p1->
y;
48 double zside = p2->
z - p1->
z;
50 return hside * hside + vside * vside + zside * zside;
76 static inline uint8_t *
82 #if PARANOIA_LEVEL > 0
84 assert(n <= pa->npoints);
85 assert(n <= pa->maxpoints);
144 static inline uint32_t
190 for (i = 0; i < col->
ngeoms; i++)
240 inline static uint64_t
243 x = (
x | (
x << 16)) & 0x0000FFFF0000FFFFULL;
244 x = (
x | (
x << 8)) & 0x00FF00FF00FF00FFULL;
245 x = (
x | (
x << 4)) & 0x0F0F0F0F0F0F0F0FULL;
246 x = (
x | (
x << 2)) & 0x3333333333333333ULL;
247 x = (
x | (
x << 1)) & 0x5555555555555555ULL;
249 y = (
y | (
y << 16)) & 0x0000FFFF0000FFFFULL;
250 y = (
y | (
y << 8)) & 0x00FF00FF00FF00FFULL;
251 y = (
y | (
y << 4)) & 0x0F0F0F0F0F0F0F0FULL;
252 y = (
y | (
y << 2)) & 0x3333333333333333ULL;
253 y = (
y | (
y << 1)) & 0x5555555555555555ULL;
259 inline static uint64_t
272 b = 0xFFFFFFFFULL ^ a;
273 c = 0xFFFFFFFFULL ^ (
x |
y);
274 d =
x & (
y ^ 0xFFFFFFFFULL);
278 C = ((c >> 1) ^ (b & (d >> 1))) ^ c;
279 D = ((a & (c >> 1)) ^ (d >> 1)) ^ d;
288 A = ((a & (a >> 2)) ^ (b & (b >> 2)));
289 B = ((a & (b >> 2)) ^ (b & ((a ^ b) >> 2)));
290 C ^= ((a & (c >> 2)) ^ (b & (d >> 2)));
291 D ^= ((b & (c >> 2)) ^ ((a ^ b) & (d >> 2)));
300 A = ((a & (a >> 4)) ^ (b & (b >> 4)));
301 B = ((a & (b >> 4)) ^ (b & ((a ^ b) >> 4)));
302 C ^= ((a & (c >> 4)) ^ (b & (d >> 4)));
303 D ^= ((b & (c >> 4)) ^ ((a ^ b) & (d >> 4)));
312 A = ((a & (a >> 8)) ^ (b & (b >> 8)));
313 B = ((a & (b >> 8)) ^ (b & ((a ^ b) >> 8)));
314 C ^= ((a & (c >> 8)) ^ (b & (d >> 8)));
315 D ^= ((b & (c >> 8)) ^ ((a ^ b) & (d >> 8)));
324 C ^= ((a & (c >> 16)) ^ (b & (d >> 16)));
325 D ^= ((b & (c >> 16)) ^ ((a ^ b) & (d >> 16)));
334 i1 = b | (0xFFFFFFFFULL ^ (i0 | a));
344 #define POSTGIS_FREE_IF_COPY_P(ptrsrc, ptrori) \
347 if ((Pointer)(ptrsrc) != (Pointer)(ptrori)) \
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
#define FLAGS_NDIMS(flags)
#define POLYHEDRALSURFACETYPE
#define LW_TRUE
Return types for functions with status returns.
static const POINT2D * getPoint2d_cp(const POINTARRAY *pa, uint32_t n)
Returns a POINT2D pointer into the POINTARRAY serialized_ptlist, suitable for reading from.
static const POINT3D * getPoint3d_cp(const POINTARRAY *pa, uint32_t n)
Returns a POINT3D pointer into the POINTARRAY serialized_ptlist, suitable for reading from.
static const POINT4D * getPoint4d_cp(const POINTARRAY *pa, uint32_t n)
Returns a POINT4D pointer into the POINTARRAY serialized_ptlist, suitable for reading from.
static double distance2d_sqr_pt_pt(const POINT2D *p1, const POINT2D *p2)
static uint64_t uint32_hilbert(uint32_t px, uint32_t py)
static uint32_t lwgeom_get_type(const LWGEOM *geom)
Return LWTYPE number.
static int lwcircstring_is_empty(const LWCIRCSTRING *circ)
static int lwpoly_is_empty(const LWPOLY *poly)
static size_t ptarray_point_size(const POINTARRAY *pa)
static uint8_t * getPoint_internal(const POINTARRAY *pa, uint32_t n)
static int lwcollection_is_empty(const LWCOLLECTION *col)
static uint64_t uint64_interleave_2(uint64_t x, uint64_t y)
static int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
static int lwline_is_empty(const LWLINE *line)
static int lwtriangle_is_empty(const LWTRIANGLE *triangle)
static LWPOINT * lwgeom_as_lwpoint(const LWGEOM *lwgeom)
static double distance3d_sqr_pt_pt(const POINT3D *p1, const POINT3D *p2)
static int lwpoint_is_empty(const LWPOINT *point)
uint8_t * serialized_pointlist