Return 1 if given srid is planar (0 otherwise, i.e geocentric srid) Return -1 if srid is not in spatial_ref_sys.
Definition at line 329 of file lwgeom_in_gml.c.
Referenced by parse_gml_srs().
335 if (SPI_OK_CONNECT != SPI_connect ())
336 lwpgerror(
"gml_is_srid_planar: could not connect to SPI manager");
339 sprintf(query,
"SELECT position('+units=m ' in proj4text) \ 340 FROM spatial_ref_sys WHERE srid='%d'", srid);
342 err = SPI_exec(query, 1);
343 if (err < 0) lwpgerror(
"gml_is_srid_planar: error executing query %d", err);
346 if (SPI_processed <= 0)
352 result = SPI_getvalue(SPI_tuptable->vals[0], SPI_tuptable->tupdesc, 1);
353 is_planar = atoi(result);