363{
366 double *dptr = (double *)(geometry_start);
367 int32_t *iptr = (int32_t *)(geometry_start);
368
369
371 {
373 }
374
375
377 {
378 int i = 1;
379
380
381 int isempty = (iptr[1] == 0);
382
383
385
386 gbox->
xmin = gbox->
xmax = dptr[i++];
387 gbox->
ymin = gbox->
ymax = dptr[i++];
390 {
391 gbox->
zmin = gbox->
zmax = dptr[i++];
392 }
394 {
395 gbox->
mmin = gbox->
mmax = dptr[i++];
396 }
399 }
400
402 {
404 int i = 0;
405 int npoints = iptr[1];
406
407
408 if (npoints != 2)
410
411
412
413 i++;
416
417
418 i++;
421
424 {
425
426 i++;
429 }
431 {
432
433 i++;
436 }
439 }
440
442 {
443 int i = 0;
444 int ngeoms = iptr[1];
445 int npoints;
446
447
448 if (ngeoms != 1)
450
451
452 npoints = iptr[3];
453
454
455
456 if (npoints != 1)
458
459
460
461
462 i += 2;
463
464
465 gbox->
xmin = gbox->
xmax = dptr[i++];
466 gbox->
ymin = gbox->
ymax = dptr[i++];
469 {
470 gbox->
zmin = gbox->
zmax = dptr[i++];
471 }
473 {
474 gbox->
mmin = gbox->
mmax = dptr[i++];
475 }
478 }
479
481 {
483 int i = 0;
484 int ngeoms = iptr[1];
485 int npoints;
486
487
488 if (ngeoms != 1)
490
491
492 npoints = iptr[3];
493
494 if (npoints != 2)
496
497
498
499
500
501 i += 2;
504
505
506 i++;
509
512 {
513
514 i++;
517 }
519 {
520
521 i++;
524 }
527 }
528
530}
void gbox_float_round(GBOX *gbox)
Round given GBOX to float boundaries.
uint32_t gserialized2_get_type(const GSERIALIZED *g)
Extract the geometry type from the serialized form (it hides in the anonymous data area,...
static uint8_t * gserialized2_get_geometry_p(const GSERIALIZED *g)
lwflags_t gserialized2_get_lwflags(const GSERIALIZED *g)
Read the flags from a GSERIALIZED and return a standard lwflag integer.
#define G2FLAGS_GET_BBOX(gflags)
#define G2FLAGS_GET_GEODETIC(gflags)
#define G2FLAGS_GET_Z(gflags)
#define G2FLAGS_GET_M(gflags)
#define G2FLAGS_NDIMS(gflags)
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.