15 | | '''2) Implement a set of geometry to raster functions''' |
16 | | |
17 | | Mentor: Pierre Racine (pierre.racine at sbf.ulaval.ca) |
18 | | |
19 | | With the ability to store geometries and rasters in postgis, there is now a gap to fill by implementing geometry to raster algorithms to allow transition from one type to the other. |
20 | | |
21 | | 1) '''ST_Interpolate''' should be an aggregate taking a set of points (e.g. filtered lidar points) or line geometries (e.g. digitized topo lines) and their associated values and returning a raster representing a surface interpolated from those values. There are numerous methods of [http://en.wikipedia.org/wiki/Interpolation interpolation] and it would nice to have a generic method so we can use all of them, but we’re first targeting [http://en.wikipedia.org/wiki/Bilinear_interpolation bilinear interpolation], which will fill most needs and lay the ground for other methods. For reference, you might want to check an implementation in [http://apps.nrbook.com/empanel/index.html Numerical Recipes (chap. 3)] or in [http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Interpolation/Chapter_main.html#Section_68.3 CGAL]. Converting a point table to a TIN and then to a raster is also a way to go. A Delaunay triangulation can be produced with the [http://www.cs.cmu.edu/~quake/triangle.html Triangle library] (copyright issues should be checked first). See also [http://postgis.17.n6.nabble.com/Voronoi-Dalaunay-function-again-td3522575.html here] and [http://postgis.17.n6.nabble.com/Voronoi-tessellation-td4549913.html here]. |
22 | | |
23 | | |
24 | | 2) '''ST_AsDensity''' takes a point or line geometry coverage and first assign a count of those features to every pixels of a raster coverage and then apply a smoothing filter (using the existing one raster version of neighbour ST_MapAlgebra). [http://www.spatialanalysisonline.com/output/html/Pointdensity.html Density functions] allow summarizing or simplifying a point or line dataset. |
25 | | |
26 | | 3) '''ST_Distance''' takes a point or a geometry coverage and compute a raster representing the distance to the nearest geometry. Another function ST_CostDistance() compute the smallest distance to the geometry following a cost raster. This project was [http://trac.osgeo.org/postgis/wiki/PostGIS_Raster_SoC_Idea_2012/Distance_Analysis_Tools proposed by Qing Liu and accepted by the GSoC program]. |
| 15 | More information about GDAL PostGIS Raster driver [http://trac.osgeo.org/gdal/wiki/frmts_wtkraster.html here] |