PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ get_result_srid()

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

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

623 {
624  va_list ap;
625  va_start(ap, funcname);
626  int32_t srid = SRID_INVALID;
627  size_t i;
628  for(i = 0; i < count; i++)
629  {
630  LWGEOM* g = va_arg(ap, LWGEOM*);
631  if (!g)
632  {
633  lwerror("%s: Geometry is null", funcname);
634  return SRID_INVALID;
635  }
636  if (i == 0)
637  {
638  srid = g->srid;
639  }
640  else
641  {
642  if (g->srid != srid)
643  {
644  lwerror("%s: Operation on mixed SRID geometries (%d != %d)", funcname, srid, g->srid);
645  return SRID_INVALID;
646  }
647  }
648  }
649  return srid;
650 }
#define SRID_INVALID
Definition: liblwgeom.h:233
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:446

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

Here is the call graph for this function: