py4sci

Previous topic

osm2shp

Next topic

gdal_density

This Page

map2shape

This script converts gridded river sections into a shape file.

Input:

rivermap: PCRaster map, containing the river sections as integers drainmap: Accumulated drainage map over the pixels, contained in rivermap.__add__

Both inputs are produced by a script called ‘srtm_burn_process.bat’ (no shell-version available yet) This script can be run from within srtm_burn_process.bat eventually

map2shape.convertCoord(proj_src, proj_trg, x, y)

Convert a list of x,y pairs in a certain projection to another projection

input:

proj_src: string, EPSG or proj4 string referring to projection of source coordinates proj_trg: string, EPSG or proj4 string referring to projection of target coordinates x: NumPy array, vector or 2D array of x-coordinates (source) y: NumPy array, vector or 2D array of y-coordinates (source)

output:

X: NumPy array, vector or 2D array of x-coordinates (target) Y: NumPy array, vector or 2D array of y-coordinates (target)
map2shape.readMap(fileName, fileFormat)

Read geographical file into memory