Changes between Version 15 and Version 16 of PostGIS_Raster_SoC_Idea_2012/Distance_Analysis_Tools/document


Ignore:
Timestamp:
Jul 12, 2012, 10:57:21 PM (12 years ago)
Author:
qliu
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • PostGIS_Raster_SoC_Idea_2012/Distance_Analysis_Tools/document

    v15 v16  
    3636  Converting one or a set of source geometries to one raster can be performed like this in PostGIS:
    3737 
    38 {{{
     38  {{{
    3939#!c
    4040raster ST_Union(raster ST_AsRaster(source_geom, list of parameters of raster specifications))
    4141}}}
    4242
    43 The Euclidean distance from each pixel to its nearest source pixel can then be computed using ST_MapAlgebra.
     43  The Euclidean distance from each pixel to its nearest source pixel can then be computed using ST_MapAlgebra.
    4444
    45 {{{
     45  {{{
    4646#!sql
    4747CREATE FUNCTION euclidean_fct(pos1 integer[], pos2 integer[])
     
    6060}}}
    6161       
    62 Remarks:
    63 ○       In case source table containing only one point (constraint 1), converting source point to raster could utilize ST_AsRaster() to create a raster with the point geometry and raster specifications.
    64 ○       In case source table containing more than one point but the number of source points is small (constraint 5), computing distance could rescan all the source points and assign the shortest distance to the pixel being computed.
     62'''Remarks:'''
     63 ○      In case source table containing only one point (constraint 1), converting source point to raster could utilize ST_AsRaster() to create a raster with the point geometry and raster specifications.
     64 ○      In case source table containing more than one point but the number of source points is small (constraint 5), computing distance could rescan all the source points and assign the shortest distance to the pixel being computed.
    6565
    66 Pros
    67 ○       Simplest approach already implemented in other GIS like GRASS.
    68 ○       
    69 Cons:
    70 ○       Producing an intermediate raster is costly if the requested raster resolution is very high (constraint 3, 5b & 5d).
    71 ○       ST_Union could be very inefficient at producing the required raster from a large set of geometries and there is no efficient method to produce such a raster right now in PostGIS (constraints 1, 5c & 5d).
    72 ○       It could be very inefficient to rescan all the source points to find the one nearest to the current pixel (constraint 6, 7, 8 & 12). We still have to see how GRASS does this efficiently.
    73 ○       Only rasters which extent contains all the source points could be produced.
    74 ○       This approach does not answer well to the requirement of developing a generic reusable solution for more interpolation needs (constraint 7).
     66'''Pros:'''
     67 ○      Simplest approach already implemented in other GIS like GRASS.
     68
     69'''Cons:'''
     70 ○      Producing an intermediate raster is costly if the requested raster resolution is very high (constraint 3, 5b & 5d).
     71 ○      ST_Union could be very inefficient at producing the required raster from a large set of geometries and there is no efficient method to produce such a raster right now in PostGIS (constraints 1, 5c & 5d).
     72 ○      It could be very inefficient to rescan all the source points to find the one nearest to the current pixel (constraint 6, 7, 8 & 12). We still have to see how GRASS does this efficiently.
     73 ○      Only rasters which extent contains all the source points could be produced.
     74 ○      This approach does not answer well to the requirement of developing a generic reusable solution for more interpolation needs (constraint 7).
    7575
    7676==== 2. The TIN approach ====