1815 LWGEOM *inlwgeom, *outlwgeom;
1818 POSTGIS_DEBUG(2,
"LWGEOM_segmentize2d called");
1820 ingeom = PG_GETARG_GSERIALIZED_P(0);
1821 dist = PG_GETARG_FLOAT8(1);
1831 PG_RETURN_POINTER(ingeom);
1837 elog(ERROR,
"ST_Segmentize: invalid max_distance %g (must be >= 0)", dist);
1848 PG_RETURN_POINTER(ingeom);
1852 if ( ! outlwgeom ) {
1854 PG_FREE_IF_COPY(ingeom, 0);
1859 if ( inlwgeom->
bbox )
1867 PG_FREE_IF_COPY(ingeom, 0);
1869 PG_RETURN_POINTER(outgeom);
GBOX * gbox_copy(const GBOX *box)
Return a copy of the GBOX, based on dimensionality of flags.
uint32_t gserialized_get_type(const GSERIALIZED *s)
Extract the geometry type from the serialized form (it hides in the anonymous data area...
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
#define POLYHEDRALSURFACETYPE
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)
LWGEOM * lwgeom_segmentize2d(LWGEOM *line, double dist)
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members) ...