PostGIS  2.5.0dev-r@@SVN_REVISION@@
void lwgeom_set_srid ( LWGEOM geom,
int32_t  srid 
)

Definition at line 1572 of file lwgeom.c.

References LWCOLLECTION::geoms, LWDEBUGF, lwgeom_as_lwcollection(), lwgeom_is_collection(), LWCOLLECTION::ngeoms, and LWGEOM::srid.

Referenced by lwgeom_subdivide().

1573 {
1574  uint32_t i;
1575 
1576  LWDEBUGF(4,"entered with srid=%d",srid);
1577 
1578  geom->srid = srid;
1579 
1580  if ( lwgeom_is_collection(geom) )
1581  {
1582  /* All the children are set to the same SRID value */
1583  LWCOLLECTION *col = lwgeom_as_lwcollection(geom);
1584  for ( i = 0; i < col->ngeoms; i++ )
1585  {
1586  lwgeom_set_srid(col->geoms[i], srid);
1587  }
1588  }
1589 }
uint32_t ngeoms
Definition: liblwgeom.h:506
int32_t srid
Definition: liblwgeom.h:398
unsigned int uint32_t
Definition: uthash.h:78
LWGEOM ** geoms
Definition: liblwgeom.h:508
LWCOLLECTION * lwgeom_as_lwcollection(const LWGEOM *lwgeom)
Definition: lwgeom.c:223
int lwgeom_is_collection(const LWGEOM *geom)
Determine whether a LWGEOM can contain sub-geometries or not.
Definition: lwgeom.c:1078
void lwgeom_set_srid(LWGEOM *geom, int32_t srid)
Definition: lwgeom.c:1572
#define LWDEBUGF(level, msg,...)
Definition: lwgeom_log.h:88

Here is the call graph for this function:

Here is the caller graph for this function: