146{
147 PATH *path;
153 int i;
154
155 POSTGIS_DEBUG(2, "path_to_geometry called");
156
157 if ( PG_ARGISNULL(0) )
158 PG_RETURN_NULL();
159
160 path = PG_GETARG_PATH_P(0);
161
162 if ( ! path )
163 PG_RETURN_NULL();
164
166 for ( i = 0; i < path->npts; i++ )
167 {
168 p = path->p[i];
172 }
176
177 PG_RETURN_POINTER(geom);
178}
POINTARRAY * ptarray_construct_empty(char hasz, char hasm, uint32_t maxpoints)
Create a new POINTARRAY with no points.
LWLINE * lwline_construct(int32_t srid, GBOX *bbox, POINTARRAY *points)
LWGEOM * lwline_as_lwgeom(const LWLINE *obj)
int ptarray_append_point(POINTARRAY *pa, const POINT4D *pt, int allow_duplicates)
Append a point to the end of an existing POINTARRAY If allow_duplicate is LW_FALSE,...
#define SRID_UNKNOWN
Unknown SRID value.
void lwline_free(LWLINE *line)