PostGIS  3.3.9dev-r@@SVN_REVISION@@

◆ get_result_srid()

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

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

643 {
644  va_list ap;
645  va_start(ap, funcname);
646  int32_t srid = SRID_INVALID;
647  size_t i;
648  for(i = 0; i < count; i++)
649  {
650  LWGEOM* g = va_arg(ap, LWGEOM*);
651  if (!g)
652  {
653  lwerror("%s: Geometry is null", funcname);
654  va_end(ap);
655  return SRID_INVALID;
656  }
657  if (i == 0)
658  {
659  srid = g->srid;
660  }
661  else
662  {
663  if (g->srid != srid)
664  {
665  lwerror("%s: Operation on mixed SRID geometries (%d != %d)", funcname, srid, g->srid);
666  va_end(ap);
667  return SRID_INVALID;
668  }
669  }
670  }
671  va_end(ap);
672  return srid;
673 }
#define SRID_INVALID
Definition: liblwgeom.h:234
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:190
int count
Definition: genraster.py:57
int32_t srid
Definition: liblwgeom.h:475

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

Here is the call graph for this function: