107 PG_RETURN_POINTER(geom);
109 if ( (PG_NARGS()>1) && (!PG_ARGISNULL(1)) )
110 area = PG_GETARG_FLOAT8(1);
112 if ( (PG_NARGS()>2) && (!PG_ARGISNULL(2)) )
113 set_area = PG_GETARG_INT32(2);
118 if ( ! out ) PG_RETURN_NULL();
123 result = geometry_serialize(out);
125 PG_FREE_IF_COPY(geom, 0);
126 PG_RETURN_POINTER(
result);
char result[OUT_DOUBLE_BUFFER_SIZE]
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.