35 #include "../postgis_config.h" 37 #include "lwgeom_pg.h" 56 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);
104 double tol = PG_GETARG_FLOAT8(1);
105 int toltype = PG_GETARG_INT32(2);
106 int flags = PG_GETARG_INT32(3);
108 LWGEOM *igeom = NULL, *ogeom = NULL;
110 POSTGIS_DEBUG(2,
"ST_CurveToLine called.");
112 POSTGIS_DEBUGF(3,
"tol = %g, typ = %d, flg = %d", tol, toltype, flags);
123 PG_FREE_IF_COPY(geom, 0);
124 PG_RETURN_POINTER(ret);
132 LWGEOM *igeom = NULL, *ogeom = NULL;
134 POSTGIS_DEBUG(2,
"LWGEOM_line_desegmentize.");
142 PG_FREE_IF_COPY(geom, 0);
148 PG_FREE_IF_COPY(geom, 0);
149 PG_RETURN_POINTER(ret);
LWGEOM * lwgeom_stroke(const LWGEOM *geom, uint32_t perQuad)
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Datum ST_CurveToLine(PG_FUNCTION_ARGS)
int lwgeom_has_arc(const LWGEOM *geom)
Datum LWGEOM_has_arc(PG_FUNCTION_ARGS)
Datum LWGEOM_curve_segmentize(PG_FUNCTION_ARGS)
Datum LWGEOM_line_desegmentize(PG_FUNCTION_ARGS)
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)
PG_FUNCTION_INFO_V1(LWGEOM_has_arc)
LWGEOM * lwgeom_unstroke(const LWGEOM *geom)
LWGEOM * lwcurve_linearize(const LWGEOM *geom, double tol, LW_LINEARIZE_TOLERANCE_TYPE type, int flags)
This library is the generic geometry handling section of PostGIS.