Changes between Version 13 and Version 14 of PostGIS_Raster_SoC_Idea_2012/Distance_Analysis_Tools/document


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

Legend:

Unmodified
Added
Removed
Modified
  • PostGIS_Raster_SoC_Idea_2012/Distance_Analysis_Tools/document

    v13 v14  
    3737 
    3838{{{
    39 #!sql
     39#!c
    4040raster ST_Union(raster ST_AsRaster(source_geom, list of parameters for raster specifications))
    4141}}}
     
    4343The Euclidean distance from each pixel to its nearest source pixel can then be computed using ST_MapAlgebra.
    4444
    45                 CREATE FUNCTION euclidean_fct(pos1 integer[], pos2 integer[])
     45{{{
     46#!
     47sql
     48CREATE FUNCTION euclidean_fct(pos1 integer[], pos2 integer[])
    4649RETURNS float
    4750AS $$
     
    5659SELECT rid, ST_MapAlgebraFct(rast, 'euclidean_fct(position of computed pixel, position of source point pixel)'::regprocedure) rast
    5760FROM myexistingcoveragetable
     61}}}
    5862       
    5963Remarks: