97{
103 double area=0;
104 int set_area=0;
105
107 PG_RETURN_POINTER(geom);
108
109 if ( (PG_NARGS()>1) && (!PG_ARGISNULL(1)) )
110 area = PG_GETARG_FLOAT8(1);
111
112 if ( (PG_NARGS()>2) && (!PG_ARGISNULL(2)) )
113 set_area = PG_GETARG_INT32(2);
114
116
118 if ( ! out ) PG_RETURN_NULL();
119
120
122
125 PG_FREE_IF_COPY(geom, 0);
126 PG_RETURN_POINTER(result);
127}
LWGEOM * lwgeom_set_effective_area(const LWGEOM *igeom, int set_area, double trshld)
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
uint32_t gserialized_get_type(const GSERIALIZED *g)
Extract the geometry type from the serialized form (it hides in the anonymous data area,...
void lwgeom_free(LWGEOM *geom)
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
void lwgeom_add_bbox(LWGEOM *lwgeom)
Compute a bbox if not already computed.
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)