29 #include "utils/builtins.h"
31 #include "../postgis_config.h"
32 #include "lwgeom_pg.h"
42 text *encodedpolyline_input;
43 char *encodedpolyline;
46 if (PG_ARGISNULL(0)) PG_RETURN_NULL();
48 encodedpolyline_input = PG_GETARG_TEXT_P(0);
49 encodedpolyline = text_to_cstring(encodedpolyline_input);
51 if (PG_NARGS() > 1 && !PG_ARGISNULL(1))
60 elog(ERROR,
"lwgeom_from_encoded_polyline returned NULL");
65 geom = geometry_serialize(lwgeom);
67 PG_RETURN_POINTER(geom);
void lwgeom_set_srid(LWGEOM *geom, int32_t srid)
Set the SRID on an LWGEOM For collections, only the parent gets an SRID, all the children get SRID_UN...
void lwgeom_free(LWGEOM *geom)
LWGEOM * lwgeom_from_encoded_polyline(const char *encodedpolyline, int precision)
Create an LWGEOM object from an Encoded Polyline representation.
This library is the generic geometry handling section of PostGIS.
PG_FUNCTION_INFO_V1(line_from_encoded_polyline)
Datum line_from_encoded_polyline(PG_FUNCTION_ARGS)