| 148 | |
| 149 | {{{ |
| 150 | #!html |
| 151 | <div style='background-color: #F4F4F4; border: 1px solid gray; width:800px; padding:10px' > |
| 152 | <br> |
| 153 | <b>Comment from Mentor:</b> |
| 154 | <p> |
| 155 | - "Algorythm: a. Make an empty raster new_rast, using the same extent as the input vector point data source_point, set pixel value to NoData value." I don't think this is a good idea as you would have no control on the alignment of the raster produced. I want to be able to control the dimensions and how the raster is georeferenced. I think your best friend here is ST_AsRaster() which allows passing a geometry and some raster properties and burns the geometry in the raster. Basically ST_AsDistanceRaster() should not be so different from ST_AsRaster(), the only difference is that instead of burning the geometry in the raster, we compute a distance to the geometry for each pixel. It is very possible in this case that the geometry will be outside the extent of the requester raster. Should we want this to work for lines and polygons?<br> |
| 156 | <br> |
| 157 | -You should avoid to do two passes to compute the final pixel values: one to compute the distance in pixel/cell and another to convert into the geographical distance.<br> |
| 158 | <br> |
| 159 | -What do ArcGIS and GRASS do when there is more than one point? We need a more detailed approach for this case.<br> |
| 160 | <br> |
| 161 | -I want also a kind of approach to the problem of billions of points. Does the knn indexing help us in quickly identifying what is the nearest point to the pixel without rescanning all the point for every pixels.<br> |
| 162 | <br> |
| 163 | -In general I don't think just copying what ArcGIS or GRASS used to do is what we want. We want a true raster/vector integrated approach, scalable to billions of points, enabling the production of very large tiled rasters. I know this is a much more difficult problem but we want to end up with a variety of easy to use tools. I think this would be a much greater addition to PostGIS than just converting one raster to another raster. Think about aggregate functions or passing a geometry table name to the function. ST_AsRaster was done to work on only one geometry but how could it work to burn many geometries into one raster? Look at ST_UnionToRaster in the PostGIS raster working specifications. (<a href="http://trac.osgeo.org/postgis/wiki/WKTRaster/SpecificationWorking03">http://trac.osgeo.org/postgis/wiki/WKTRaster/SpecificationWorking03</a>)<br> |
| 164 | <br> |
| 165 | -Look also at this mail: <a href="http://postgis.refractions.net/pipermail/postgis-users/2012-April/033875.html">http://postgis.refractions.net/pipermail/postgis-users/2012-April/033875.html</a> it might be a general solution working on small and big raster but might be slower than a specific solution. We could simply implement a bunch of custom function in C...<br> |
| 166 | <br> |
| 167 | -Start thinking about the signature of some prototype SQL functions. Think about passing the name of a point table<br> |
| 168 | <br> |
| 169 | -I think the constraints should be explicited first in your document so we know in which context we want all this to work.<br> |
| 170 | </p> |
| 171 | <br> |
| 172 | </div> |
| 173 | }}} |