PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ 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.

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

References clamp_srid(), SRID_UNKNOWN, and str.

Here is the call graph for this function: