70{
72 int32 perQuad = PG_GETARG_INT32(1);
74 LWGEOM *igeom = NULL, *ogeom = NULL;
75
76 POSTGIS_DEBUG(2, "LWGEOM_curve_segmentize called.");
77
78 if (perQuad < 0)
79 {
80 elog(ERROR, "2nd argument must be positive.");
81 PG_RETURN_NULL();
82 }
83
84 POSTGIS_DEBUGF(3, "perQuad = %d", perQuad);
85
89
90 if (ogeom == NULL)
91 PG_RETURN_NULL();
92
93 ret = geometry_serialize(ogeom);
95 PG_FREE_IF_COPY(geom, 0);
96 PG_RETURN_POINTER(ret);
97}
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
LWGEOM * lwgeom_stroke(const LWGEOM *geom, uint32_t perQuad)
Convert type with arcs into equivalent linearized type.