Database Reference
In-Depth Information
),
1
)
) AS gv
FROM prism
JOIN sfpoly sf
ON ST_Intersects(prism.rast,
ST_Transform(sf.geom,
4322))
WHERE prism.month_year =
'2012-01-01'::date
)
SELECT
(gv).val,
ST_AsText((gv).geom) AS geom
FROM geoms;
The output is as follows:
val |
geom------------------+--------------------------------|
POLYGON(...)7.3899998664856 |
POLYGON(...)7.3600001335144 |
POLYGON(...)...7.30000019073486 | POLYGON(...)|
POLYGON(...)(140 rows)
Again, the query results have been trimmed. What is important is the number of
rows returned. ST_PixelsAsPolygons() returns significantly more geometries
than ST_DumpAsPolygons() .Thisisduetothedifferentmechanismusedineach
function.
The following image shows the difference between ST_DumpAsPolygons() and
ST_PixelsAsPolygons() . The ST_DumpAsPolygons() function only dumps
pixels with a value and unions these pixels with the same value. The
ST_PixelsAsPolygons() functiondoesnotmergepixelsanddumpsallofthem,
as shown in the following diagrams:
Search WWH ::




Custom Search