-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.txt
114 lines (69 loc) · 3.28 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
A set of hydrological tools for OpenStreetMap data.
What is included?
=================
dist/.................... binary version of all tools (+ generated from Python using Freezer)
win32/
linux/
examples/
Arhnem/................ test case
src/
osm2hydro/............. Python tools
gdal_density.py...... ???
gdal_merge.py........ part of GDAL + 1 bug fixed (better contribute it back and remove)
map2shape.py......... ???
osm2hydro.py......... ???
osm2shp.py...........
poly_density.py...... convert shape to fraction coverage per pixel
osm2shp/............... modified version of osm2shp, extended with filtering
osmconvert/............ part of OSM, extracts subset of OSM file
osmfilter/............. part of OSM
setup.py
third-party/............. external tools, libraries (included, but not modified)
Installation
============
>> TODO <<
Do NOT install osm2hydro in a directory with a space in the name (e.g. "Program Files")
Required libraries
- GDAL >- 10.1.0 (Both the executables and the python bindings)
- PyWavelets - http://www.pybytes.com/pywavelets/
- PyProj - http://code.google.com/p/pyproj/
Usage
=====
Most of the functionality of the osm2hydro tools can be found in the examples/.
Developing on Windows (only needed for active development)
==========================================================
Download and Instally the following Python packages and development tools:
* PythonXY 2.7.x: https://code.google.com/p/pythonxy/wiki/Downloads
* Pyproj: http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyproj
* Python Tools for Visual Studio 2.0: https://pytools.codeplex.com/releases/view/103102
* GDAL 1.10: http://www.gisinternals.com/sdk/PackageList.aspx?file=release-1600-gdal-1-10-mapserver-6-4.zip
* GDAL 1.10 Python: http://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal
* basemap for matplotlib: http://sourceforge.net/projects/matplotlib/files/matplotlib-toolkits/
* Shapely 1.2.18: http://www.lfd.uci.edu/~gohlke/pythonlibs/
* Kartograph: http://kartograph.org/docs/kartograph.py/
* tinycss: pip install tinycss
If you plan to view examples/ using Python notebook (run in python):
> from IPython.external import mathjax; mathjax.install_mathjax()
Run the following in console to link osm2hydro sources to your python installation
> cd src
> python setup.py develop
At this point osm2hydro can be used as a command-line tool or as a library:
> import osm2hydro
Enjoy!
Developing on UNIX
==================
>> TODO: Jaap <<
Using IPython Notebook
======================
Make sure that osm2hydro is installed or linked (using "python setup.py develop")
> cd examples/Arnhem
> ipython notebook --pylab=inline
Then you should be able to browse and use notebooks in the current directory (files with .ipynb extension).
Code Contributors
=================
Citations
=========
Schellekens, J., Brolsma, R.J., Dahm, R.J., Donchyts, G.V., Winsemius, H.C., 2014. Rapid setup of hydrological and hydraulic models using OpenStreetMap and the SRTM derived digital elevation model. Environmental Modelling & Software 61, 98–105. doi:10.1016/j.envsoft.2014.07.006