PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ get_result_srid()

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

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

677 {
678  va_list ap;
679  va_start(ap, funcname);
680  int32_t srid = SRID_INVALID;
681  size_t i;
682  for(i = 0; i < count; i++)
683  {
684  LWGEOM* g = va_arg(ap, LWGEOM*);
685  if (!g)
686  {
687  lwerror("%s: Geometry is null", funcname);
688  va_end(ap);
689  return SRID_INVALID;
690  }
691  if (i == 0)
692  {
693  srid = g->srid;
694  }
695  else
696  {
697  if (g->srid != srid)
698  {
699  lwerror("%s: Operation on mixed SRID geometries (%d != %d)", funcname, srid, g->srid);
700  va_end(ap);
701  return SRID_INVALID;
702  }
703  }
704  }
705  va_end(ap);
706  return srid;
707 }
#define SRID_INVALID
Definition: liblwgeom.h:219
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:460

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

Here is the call graph for this function: