PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ get_result_srid()

static int32_t get_result_srid ( size_t  count,
const char *  funcname,
  ... 
)
static

Definition at line 627 of file liblwgeom/lwgeom_geos.c.

628{
629 va_list ap;
630 va_start(ap, funcname);
631 int32_t srid = SRID_INVALID;
632 size_t i;
633 for(i = 0; i < count; i++)
634 {
635 LWGEOM* g = va_arg(ap, LWGEOM*);
636 if (!g)
637 {
638 lwerror("%s: Geometry is null", funcname);
639 va_end(ap);
640 return SRID_INVALID;
641 }
642 if (i == 0)
643 {
644 srid = g->srid;
645 }
646 else
647 {
648 if (g->srid != srid)
649 {
650 lwerror("%s: Operation on mixed SRID geometries (%d != %d)", funcname, srid, g->srid);
651 va_end(ap);
652 return SRID_INVALID;
653 }
654 }
655 }
656 va_end(ap);
657 return srid;
658}
#define SRID_INVALID
Definition liblwgeom.h:219
void void lwerror(const char *fmt,...) __attribute__((format(printf
Write a notice out to the error handler.
int count
Definition genraster.py:57
int32_t srid
Definition liblwgeom.h:460

References lwerror(), LWGEOM::srid, and SRID_INVALID.

Here is the call graph for this function: