GEO.OPTIMIZE is available since version 1.2.13.
GEO.OPTIMIZE function optimizes a GEOSHAPE instance by modifying its cells to either limit the finest resolution present in the shape or reduce the number of cells by merging cells which cover a whole cell at the coarser resolution.
// Zone in WKT
'POLYGON ((-4.574435 48.641404, -4.565680 48.641404, -4.565680 48.636101, -4.574435 48.636101, -4.574435 48.641404 ))'
// Precision (10% of the bounding box diagonal)
// Consider all cells covering the area
// Generate the regexp of the GEOSHAPE and that of two optimized versions
$shape 0 GEO.OPTIMIZE GEO.REGEXP
$shape 10 GEO.OPTIMIZE GEO.REGEXP