PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ wkt_parser_geometry_new()

void wkt_parser_geometry_new ( LWGEOM geom,
int32_t  srid 
)

Definition at line 860 of file lwin_wkt.c.

861 {
862  LWDEBUG(4,"entered");
863  LWDEBUGF(4,"geom %p",geom);
864  LWDEBUGF(4,"srid %d",srid);
865 
866  if ( geom == NULL )
867  {
868  lwerror("Parsed geometry is null!");
869  return;
870  }
871 
872  if ( srid != SRID_UNKNOWN && srid < SRID_MAXIMUM )
873  lwgeom_set_srid(geom, srid);
874  else
876 
877  global_parser_result.geom = geom;
878 }
void lwgeom_set_srid(LWGEOM *geom, int32_t srid)
Set the SRID on an LWGEOM For collections, only the parent gets an SRID, all the children get SRID_UN...
Definition: lwgeom.c:1530
#define SRID_MAXIMUM
Maximum allowed SRID value in serialized geometry.
Definition: liblwgeom.h:220
#define SRID_UNKNOWN
Unknown SRID value.
Definition: liblwgeom.h:229
#define LWDEBUG(level, msg)
Definition: lwgeom_log.h:83
#define LWDEBUGF(level, msg,...)
Definition: lwgeom_log.h:88
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:190
LWGEOM_PARSER_RESULT global_parser_result

References struct_lwgeom_parser_result::geom, global_parser_result, LWDEBUG, LWDEBUGF, lwerror(), lwgeom_set_srid(), SRID_MAXIMUM, and SRID_UNKNOWN.

Here is the call graph for this function: