| 241 | |
| 242 | === ST_CostDistance === |
| 243 | |
| 244 | '''Name''' |
| 245 | ST_CostDistance - One raster, One band version: |
| 246 | Creates a new one band raster generated from a point coverage and a one band cost raster, and aligned with the provided reference raster or with raster specifications. The pixel values in the new raster represent the least accumulative cost of traversing the cost surface from source points to each cell. |
| 247 | |
| 248 | '''Synopsis''' |
| 249 | [[BR]] |
| 250 | ST_CostDistance(refrast raster,pixeltype text,costrast raster,sourceschema text,sourcetable text,sourcegeomcolumn text,double precision = -1); |
| 251 | |
| 252 | ST_CostDistance(width integer,height integer,rastulx float8,rastuly float8,rastscalex float8,rastscaley float8,rastskewx float8,rastskewy float8,rastsrid integer,rastndv float8,pixeltype text,costrast raster,sourceschema text,sourcetable text,sourcegeomcolumn text,double precision = -1); |
| 253 | [[BR]] |
| 254 | |
| 255 | '''Description''' |
| 256 | [[BR]] |
| 257 | Create a new one band raster generated from a point coverage as source points and a one band raster as the cost surface. Pixel values in the output raster represent the least accumulative cost of traversing the cost surface from source points to each cell. A reference raster will be provided, otherwise the raster specifications are provided. The new raster will have the same georeference, width and height as the reference raster or the raster specifications. |
| 258 | Source points are passed in by the database schema, table name and the geometry column name of the point coverage. |
| 259 | It is assumed that the input reference raster, cost raster and the output new raster has only 1 band. |
| 260 | If pixeltype is passed in, then the new raster will have a band of that pixel type. If pixeltype is passed NULL, then the new raster band will have the same pixel type as the reference raster band. |
| 261 | In the reference raster variant, it will use the same nodatavalue as the reference raster. In the raster specifications variant where no reference raster is provided, both nodatavalue and pixeltype have to be passed in with a NOT NULL value. |
| 262 | If the source point coverage is out of the cost raster extent, a one band new raster will be returned with nodatavalue as pixel values. For this version, it is assumed that cost raster is not a tiled raster coverage but a only one band one raster. Thus, any source points that are out side of the cost raster extent will have not cost surface to travel through and consequently have nodatavalue as pixel value for the new output cost distance raster. |
| 263 | |
| 264 | ---- |