Changes between Version 4 and Version 5 of PostGIS_Raster_SoC_Idea_2012/Distance_Analysis_Tools/document
- Timestamp:
- Jul 11, 2012, 9:04:28 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PostGIS_Raster_SoC_Idea_2012/Distance_Analysis_Tools/document
v4 v5 8 8 9 9 10 Objectives 10 === Objectives === 11 11 12 12 We want to develop a raster/vector integrated approach to generate a distance raster coverage (optionnaly a tiled coverage) from a point coverage (could also be lines or polygons coverage) with some raster specifications, representing the euclidean distance to those points (lines or polygons). … … 15 15 16 16 17 Constraints 17 === Constraints === 18 18 19 19 1. The source table of geometries (points, line or polygons) can contain one geometry or many (eventually millions). We want the method to scale well whatever the number of source geometry. … … 29 29 7. We want the implementation to be generic enough to be reused to implement more general interpolation methods like nearest neighbor, IDW, spline or kriging. Otherwise we want it to be generic enough to be reused to implement more general cost distance methods. 30 30 31 Different Envisioned Approaches 31 === Different Envisioned Approaches === 32 32 33 1. The raster source approach - The first approach is similar to what is found in most GIS package. The source points (or geometries) are converted to a raster of sources and this raster is passed to the function. The function iterates over the pixels (or over the source points???) assigning the distance to the nearest point (or assigning minimum values to pixels within a circle progressively growing around each point???). 33 ==== 1. The raster source approach ==== 34 35 The first approach is similar to what is found in most GIS package. The source points (or geometries) are converted to a raster of sources and this raster is passed to the function. The function iterates over the pixels (or over the source points???) assigning the distance to the nearest point (or assigning minimum values to pixels within a circle progressively growing around each point???). 34 36 35 37 Converting one or a set of source geometries to one raster can be performed like this in PostGIS: … … 67 69 ○ This approach does not answer well to the requirement of developing a generic reusable solution for more interpolation needs (constraint 7). 68 70 69 2. The TIN approach - The second approach involve creating a TIN (triangulated irregular network) from the table of source geometries first and then to use this TIN to determine the nearest neighbors for each pixel. 71 ==== 2. The TIN approach ==== 72 73 The second approach involve creating a TIN (triangulated irregular network) from the table of source geometries first and then to use this TIN to determine the nearest neighbors for each pixel. 70 74 71 75 The TIN is stored temporarily. A function iterating over each pixel determines in which part of the TIN the current pixel falls and determine the triangle corner nearest to the centroid of the pixel. … … 86 90 ○ Might be very inefficient and a waste of computing TIN in case there is only one point in the source table (Constraint 1) or there are very small number of source points and the requested raster is relatively small too (Constraint 5). 87 91 88 3. The KNN index approach – The third approach is similar to the second but use the new KNN indexing facilities of PostGIS to determine the nearest neighbor points of each pixel. 92 ==== 3. The KNN index approach ==== 93 94 The third approach is similar to the second but use the new KNN indexing facilities of PostGIS to determine the nearest neighbor points of each pixel. 89 95 90 96 … … 116 122 117 123 118 Preferred Approach 124 ==== Preferred Approach ==== 119 125 120 126 Approach 3 is the preferred approach for the following reasons: … … 125 131 ● it provides a reusable approach for other types of distances (Constraint 13) and interpolation. 126 132 127 Tentative functions signatures: 133 134 ==== Tentative functions signatures: ==== 128 135 129 136 Generate a raster having the same alignment as a reference raster: