3478{
3481 GEOSGeometry* input_geos;
3482 GEOSGeometry* result_geos;
3483 int32_t srid;
3484
3486
3487 input = PG_GETARG_GSERIALIZED_P(0);
3490 if (!input_geos)
3492
3493 result_geos = GEOSMinimumRotatedRectangle(input_geos);
3494 GEOSGeom_destroy(input_geos);
3495 if (!result_geos)
3497
3498 GEOSSetSRID(result_geos, srid);
3500 GEOSGeom_destroy(result_geos);
3501
3502 PG_FREE_IF_COPY(input, 0);
3503 PG_RETURN_POINTER(result);
3504}
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)
#define HANDLE_GEOS_ERROR(label)
GEOSGeometry * POSTGIS2GEOS(GSERIALIZED *pglwgeom)