PostGIS  2.2.7dev-r@@SVN_REVISION@@
int wkt_lexer_read_srid ( char *  str)

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

Definition at line 47 of file lwin_wkt.c.

References clamp_srid(), and SRID_UNKNOWN.

Referenced by while().

48 {
49  char *c = str;
50  long i = 0;
51  int srid;
52 
53  if( ! str ) return SRID_UNKNOWN;
54  c += 5; /* Advance past "SRID=" */
55  i = strtol(c, NULL, 10);
56  srid = clamp_srid((int)i);
57  /* TODO: warn on explicit UNKNOWN srid ? */
58  return srid;
59 }
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:350
#define SRID_UNKNOWN
Unknown SRID value.
Definition: liblwgeom.h:172

Here is the call graph for this function:

Here is the caller graph for this function: