Permalink
Browse files

Introduced dependency on StreetNames and shortname output from skelet…

…ron-osm-streets.py
  • Loading branch information...
1 parent ddd6362 commit f95072f236a1f70f4cb8688cc63a7cf24e228522 Michal Migurski committed Jun 2, 2012
Showing with 8 additions and 3 deletions.
  1. +1 −0 README.txt
  2. +1 −1 setup.py
  3. +6 −2 skeletron-osm-streets.py
View
@@ -12,6 +12,7 @@ Required dependencies:
- shapely 1.2+ (http://pypi.python.org/pypi/Shapely)
- pyproj (http://code.google.com/p/pyproj)
- networkx 1.5+ (http://networkx.lanl.gov)
+ - StreetNames 0.1+ (https://github.com/nvkelso/map-label-style-manual/tree/master/tools/street_names)
You'd typically use it via one of the provided utility scripts, currently
just these two:
View
@@ -10,7 +10,7 @@
author='Michal Migurski',
author_email='mike@stamen.com',
url='https://github.com/migurski/Skeletron',
- requires=['networkx'],
+ requires=['networkx', 'StreetNames'],
packages=['Skeletron'],
scripts=['skeletron-osm-route-rels.py', 'skeletron-osm-streets.py'],
# download_url='https://github.com/downloads/migurski' % locals(),
@@ -13,6 +13,8 @@
from json import dump
from math import pi
+from StreetNames import short_street_name
+
from Skeletron import waynode_multilines
from Skeletron.input import parse_street_waynodes
from Skeletron.output import multilines_geojson
@@ -63,11 +65,13 @@
if options.use_highway:
def key_properties((name, highway)):
return dict(name=name, highway=highway,
- zoomlevel=options.zoom, pixelwidth=options.width)
+ zoomlevel=options.zoom, pixelwidth=options.width,
+ shortname=short_street_name(name))
else:
def key_properties((name, )):
return dict(name=name,
- zoomlevel=options.zoom, pixelwidth=options.width)
+ zoomlevel=options.zoom, pixelwidth=options.width,
+ shortname=short_street_name(name))
print >> stderr, 'Buffer: %(buffer).1f, density: %(density).1f, minimum length: %(min_length).1f, minimum area: %(min_area).1f.' % kwargs
print >> stderr, '-' * 20

0 comments on commit f95072f

Please sign in to comment.