2652{
2655 GEOSGeometry* input_geos;
2656 GEOSGeometry* result_geos;
2657 int32_t srid;
2658
2660
2661 input = PG_GETARG_GSERIALIZED_P(0);
2664 if (!input_geos)
2666
2667 result_geos = GEOSMinimumRotatedRectangle(input_geos);
2668 GEOSGeom_destroy(input_geos);
2669 if (!result_geos)
2671
2672 GEOSSetSRID(result_geos, srid);
2674 GEOSGeom_destroy(result_geos);
2675
2676 PG_FREE_IF_COPY(input, 0);
2677 PG_RETURN_POINTER(
result);
2678}
char result[OUT_DOUBLE_BUFFER_SIZE]
int32_t gserialized_get_srid(const GSERIALIZED *g)
Extract the SRID from the serialized form (it is packed into three bytes so this is a handy function)...
void lwgeom_geos_error(const char *fmt,...)
GSERIALIZED * GEOS2POSTGIS(GEOSGeom geom, char want3d)
GEOSGeometry * POSTGIS2GEOS(const GSERIALIZED *pglwgeom)
#define HANDLE_GEOS_ERROR(label)