39{
42 text *encodedpolyline_input;
43 char *encodedpolyline;
45
46 if (PG_ARGISNULL(0)) PG_RETURN_NULL();
47
48 encodedpolyline_input = PG_GETARG_TEXT_P(0);
49 encodedpolyline = text_to_cstring(encodedpolyline_input);
50
51 if (PG_NARGS() > 1 && !PG_ARGISNULL(1))
52 {
55 }
56
58 if ( ! lwgeom ) {
59
60 elog(ERROR, "lwgeom_from_encoded_polyline returned NULL");
61 PG_RETURN_NULL();
62 }
64
65 geom = geometry_serialize(lwgeom);
67 PG_RETURN_POINTER(geom);
68}
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.