Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!
| #Quick cp from http://sekati.com/etc/install-nodejs-on-debian-squeeze | |
| # | |
| #Needed to install TileMill from MapBox | |
| # | |
| #Installs node.js which has npm bundled | |
| # | |
| #Build Dependencies | |
| sudo apt-get update && apt-get install git-core curl build-essential openssl libssl-dev |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| ''' | |
| Simple script to create geojson from osm files. | |
| Prints geojson features line by line. | |
| Currently we don't support relations. | |
| Requires (unmodified) imposm and imposm.parser | |
| Inspired by https://github.com/emka/OSMCouch | |
| ''' |