PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ wkt_parser_geometry_new()

void wkt_parser_geometry_new ( LWGEOM geom,
int  srid 
)

Definition at line 859 of file lwin_wkt.c.

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

Referenced by yyparse().

860 {
861  LWDEBUG(4,"entered");
862  LWDEBUGF(4,"geom %p",geom);
863  LWDEBUGF(4,"srid %d",srid);
864 
865  if ( geom == NULL )
866  {
867  lwerror("Parsed geometry is null!");
868  return;
869  }
870 
871  if ( srid != SRID_UNKNOWN && srid < SRID_MAXIMUM )
872  lwgeom_set_srid(geom, srid);
873  else
875 
876  global_parser_result.geom = geom;
877 }
#define LWDEBUG(level, msg)
Definition: lwgeom_log.h:83
LWGEOM_PARSER_RESULT global_parser_result
#define SRID_UNKNOWN
Unknown SRID value.
Definition: liblwgeom.h:188
void lwgeom_set_srid(LWGEOM *geom, int srid)
Set the SRID on an LWGEOM For collections, only the parent gets an SRID, all the children get SRID_UN...
#define SRID_MAXIMUM
Maximum allowed SRID value in serialized geometry.
Definition: liblwgeom.h:179
#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
Here is the call graph for this function:
Here is the caller graph for this function: