PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ get_result_srid()

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

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

607 {
608  va_list ap;
609  va_start(ap, funcname);
610  int32_t srid = SRID_INVALID;
611  size_t i;
612  for(i = 0; i < count; i++)
613  {
614  LWGEOM* g = va_arg(ap, LWGEOM*);
615  if (!g)
616  {
617  lwerror("%s: Geometry is null", funcname);
618  return SRID_INVALID;
619  }
620  if (i == 0)
621  {
622  srid = g->srid;
623  }
624  else
625  {
626  if (g->srid != srid)
627  {
628  lwerror("%s: Operation on mixed SRID geometries (%d != %d)", funcname, srid, g->srid);
629  return SRID_INVALID;
630  }
631  }
632  }
633  return srid;
634 }
#define SRID_INVALID
Definition: liblwgeom.h:192
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:190
int count
Definition: genraster.py:56
int32_t srid
Definition: liblwgeom.h:402

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

Here is the call graph for this function: