Changes between Version 4 and Version 5 of PostGIS_Raster_SoC_Idea_2012/Distance_Analysis_Tools/document


Ignore:
Timestamp:
Jul 11, 2012, 9:04:28 PM (12 years ago)
Author:
qliu
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • PostGIS_Raster_SoC_Idea_2012/Distance_Analysis_Tools/document

    v4 v5  
    88
    99
    10 Objectives
     10=== Objectives ===
    1111
    1212We 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).
     
    1515
    1616
    17 Constraints
     17=== Constraints ===
    1818
    19191.      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.
     
    29297.      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.
    3030
    31 Different Envisioned Approaches
     31=== Different Envisioned Approaches ===
    3232
    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
     35The 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???).
    3436
    3537Converting one or a set of source geometries to one raster can be performed like this in PostGIS:
     
    6769○       This approach does not answer well to the requirement of developing a generic reusable solution for more interpolation needs (constraint 7).
    6870
    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
     73The 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.
    7074
    7175The 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.
     
    8690○       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).
    8791
    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
     94The 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.
    8995
    9096       
     
    116122
    117123
    118 Preferred Approach
     124==== Preferred Approach ====
    119125
    120126Approach 3 is the preferred approach for the following reasons:
     
    125131●       it provides a reusable approach for other types of distances (Constraint 13) and interpolation.
    126132
    127 Tentative functions signatures:
     133
     134==== Tentative functions signatures: ====
    128135
    129136Generate a raster having the same alignment as a reference raster: