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

Definition at line 1459 of file lwgeom.c.

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

1460 {
1461  int i;
1462 
1463  LWDEBUGF(4,"entered with srid=%d",srid);
1464 
1465  geom->srid = srid;
1466 
1467  if ( lwgeom_is_collection(geom) )
1468  {
1469  /* All the children are set to the same SRID value */
1470  LWCOLLECTION *col = lwgeom_as_lwcollection(geom);
1471  for ( i = 0; i < col->ngeoms; i++ )
1472  {
1473  lwgeom_set_srid(col->geoms[i], srid);
1474  }
1475  }
1476 }
int32_t srid
Definition: liblwgeom.h:355
LWGEOM ** geoms
Definition: liblwgeom.h:465
LWCOLLECTION * lwgeom_as_lwcollection(const LWGEOM *lwgeom)
Definition: lwgeom.c:143
int lwgeom_is_collection(const LWGEOM *geom)
Determine whether a LWGEOM can contain sub-geometries or not.
Definition: lwgeom.c:947
void lwgeom_set_srid(LWGEOM *geom, int32_t srid)
Definition: lwgeom.c:1459
#define LWDEBUGF(level, msg,...)
Definition: lwgeom_log.h:55

Here is the call graph for this function: