Revert "subdivide complex geoms in obs_getmeasure"

This reverts commit d44887b2b3.
This commit is contained in:
John Krauss 2016-12-28 18:40:01 +00:00
parent bbd0cc0938
commit eb508c5d16

View File

@ -837,19 +837,11 @@ BEGIN
USING (SELECT ARRAY(SELECT json_array_elements_text(params))::json[]);
RETURN QUERY EXECUTE format($query$
WITH _geoms AS (
SELECT
WITH _geoms AS (SELECT
(UNNEST($1)).val as id,
(UNNEST($1)).geom AS geom
), _simple_geoms AS (
SELECT id,
CASE WHEN ST_GeometryType(geom) = 'ST_Point' THEN geom
ELSE ST_Subdivide(geom)
END AS geom
FROM _geoms
)
(UNNEST($1)).geom AS geom)
SELECT _geoms.id::INT, %s
FROM %s, _simple_geoms _geoms
FROM %s, _geoms
WHERE %s
AND %s
GROUP BY _geoms.id