PostGIS  2.5.2dev-r@@SVN_REVISION@@

◆ wkt_lexer_read_srid()

int wkt_lexer_read_srid ( char *  str)

Read the SRID number from an SRID=<> string.

Definition at line 61 of file lwin_wkt.c.

References clamp_srid(), and SRID_UNKNOWN.

Referenced by if().

62 {
63  char *c = str;
64  long i = 0;
65  int srid;
66 
67  if( ! str ) return SRID_UNKNOWN;
68  c += 5; /* Advance past "SRID=" */
69  i = strtol(c, NULL, 10);
70  srid = clamp_srid((int)i);
71  /* TODO: warn on explicit UNKNOWN srid ? */
72  return srid;
73 }
int clamp_srid(int srid)
Return a valid SRID from an arbitrary integer Raises a notice if what comes out is different from wha...
Definition: lwutil.c:347
#define SRID_UNKNOWN
Unknown SRID value.
Definition: liblwgeom.h:187
Here is the call graph for this function:
Here is the caller graph for this function: