35 #include "../postgis_config.h"
37 #include "lwgeom_pg.h"
57 PG_RETURN_BOOL(result == 1);
72 int32 perQuad = PG_GETARG_INT32(1);
74 LWGEOM *igeom = NULL, *ogeom = NULL;
76 POSTGIS_DEBUG(2,
"LWGEOM_curve_segmentize called.");
80 elog(ERROR,
"2nd argument must be positive.");
84 POSTGIS_DEBUGF(3,
"perQuad = %d", perQuad);
95 PG_FREE_IF_COPY(geom, 0);
96 PG_RETURN_POINTER(ret);
103 double tol = PG_GETARG_FLOAT8(1);
104 int toltype = PG_GETARG_INT32(2);
105 int flags = PG_GETARG_INT32(3);
107 LWGEOM *igeom = NULL, *ogeom = NULL;
109 POSTGIS_DEBUG(2,
"ST_CurveToLine called.");
111 POSTGIS_DEBUGF(3,
"tol = %g, typ = %d, flg = %d", tol, toltype, flags);
122 PG_FREE_IF_COPY(geom, 0);
123 PG_RETURN_POINTER(ret);
131 LWGEOM *igeom = NULL, *ogeom = NULL;
133 POSTGIS_DEBUG(2,
"LWGEOM_line_desegmentize.");
141 PG_FREE_IF_COPY(geom, 0);
147 PG_FREE_IF_COPY(geom, 0);
148 PG_RETURN_POINTER(ret);
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
LWGEOM * lwcurve_linearize(const LWGEOM *geom, double tol, LW_LINEARIZE_TOLERANCE_TYPE type, int flags)
LWGEOM * lwgeom_unstroke(const LWGEOM *geom)
LWGEOM * lwgeom_stroke(const LWGEOM *geom, uint32_t perQuad)
int lwgeom_has_arc(const LWGEOM *geom)
This library is the generic geometry handling section of PostGIS.
Datum LWGEOM_has_arc(PG_FUNCTION_ARGS)
PG_FUNCTION_INFO_V1(LWGEOM_has_arc)
Datum ST_CurveToLine(PG_FUNCTION_ARGS)
Datum LWGEOM_line_desegmentize(PG_FUNCTION_ARGS)
Datum LWGEOM_curve_segmentize(PG_FUNCTION_ARGS)
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)