use simple envelope for very complex geometries in obs_getgetgeometryscores
This commit is contained in:
@@ -434,6 +434,11 @@ CREATE OR REPLACE FUNCTION cdb_observatory._OBS_GetGeometryScores(
|
|||||||
) AS $$
|
) AS $$
|
||||||
BEGIN
|
BEGIN
|
||||||
filter_geom_ids := COALESCE(filter_geom_ids, (ARRAY[])::TEXT[]);
|
filter_geom_ids := COALESCE(filter_geom_ids, (ARRAY[])::TEXT[]);
|
||||||
|
-- Very complex geometries simply fail. For a boundary check, we can
|
||||||
|
-- comfortably get away with the simplicity of an envelope
|
||||||
|
IF ST_Npoints(bounds) > 10000 THEN
|
||||||
|
bounds := ST_Envelope(bounds);
|
||||||
|
END IF;
|
||||||
RETURN QUERY
|
RETURN QUERY
|
||||||
EXECUTE format($string$
|
EXECUTE format($string$
|
||||||
SELECT
|
SELECT
|
||||||
|
|||||||
Reference in New Issue
Block a user