Opened 6 years ago
Last modified 2 years ago
#2327 new enhancement
[raster] ST_Drape
Reported by: | Bborie Park | Owned by: | Bborie Park |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS Fund Me |
Component: | raster | Version: | trunk |
Keywords: | Cc: | dmcclean |
Description
Taking a geometry and a raster, return a new XYM geometry resulting from overlaying the geometry on the raster and populating M with values from the raster.
Reference:
http://vterrain.org/Misc/draping.html
geometry ST_Drape( rast raster, nband int, geom geometry, computed_vertices boolean DEFAULT TRUE )
Some things to think about before implementing...
- XYM or XYZ output geometry: Assuming the raster is DEM, units are typically meter or foot. If X/Y are degrees, populating Z in the DEM's units don't make sense. Maybe a function parameter flag indicating output should be XYZ or XYM?
- 3D geometry with rasters: The geometry is treated as 2D. Should pixel values be put into Z or M?
- computed_vertices: The returning geometry should be as detailed as the input raster. So, returning geometry will have the same vertices of the input geometry and possibly.
- Polygons: How to handle the interior of the polygon? Boundary is easy. Multipolygon? TIN?
Change History (5)
comment:1 Changed 6 years ago by
comment:2 Changed 5 years ago by
Also relevant: http://blog.mathieu-leplatre.info/drape-lines-on-a-dem-with-postgis.html
Re: 2) I'd say keep 3D, add M, and if the user wants to make it Z, then they should convert to 2D before draping.
comment:3 Changed 5 years ago by
Amen. It would be nice to have a tolerance parameter like the one to ST_Simplify that adaptively downsamples from the full DEM-resolution/input-resolution result.
comment:4 Changed 5 years ago by
Cc: | dmcclean added |
---|
For polygons, use Delaunay Triangles capability from GEOS. Should have something similar to how ST_DelaunayTriangles() allows the user to control output between a TIN, MULTILINESTRING or COLLECTION of polygons.