152{
154 double from = PG_GETARG_FLOAT8(1);
155 double to = PG_GETARG_FLOAT8(2);
158 static char ordinate = 'Z';
159 static double offset = 0.0;
160
162 {
163 elog(ERROR, "This function only accepts geometries with Z dimensions.");
164 PG_RETURN_NULL();
165 }
166
170 PG_FREE_IF_COPY(geom_in, 0);
171
172 if ( ! geom_out )
173 {
174 elog(ERROR,"lwline_clip_to_ordinate_range returned null");
175 PG_RETURN_NULL();
176 }
177
178 PG_RETURN_POINTER(geometry_serialize((
LWGEOM*)geom_out));
179}
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
int gserialized_has_z(const GSERIALIZED *g)
Check if a GSERIALIZED has a Z ordinate.
void lwgeom_free(LWGEOM *geom)
LWCOLLECTION * lwgeom_clip_to_ordinate_range(const LWGEOM *lwin, char ordinate, double from, double to, double offset)
Given a geometry clip based on the from/to range of one of its ordinates (x, y, z,...