presto-geospatial/src/main/java/io/prestosql/plugin/geospatial/aggregation/GeometryStateFactory.java/GeometryStateFactory/getGeometryMemorySize
class GeometryStateFactory:    private static long getGeometryMemorySize(OGCGeometry geometry)
    {
        if (geometry == null) {
            return 0;
        }
        // Due to the following issue:
        // https://github.com/Esri/geometry-api-java/issues/192
        // We must check if the geometry is empty before calculating its size.  Once the issue is resolved
        // and we bring the fix into our codebase, we can remove this check.
        if (geometry.isEmpty()) {
            return OGC_GEOMETRY_BASE_INSTANCE_SIZE;
        }
        return geometry.estimateMemorySize();
    }