Closed stringfellow closed 9 years ago
Oh I've just seen the XLS file! Cool.
@andrewphilipsmith I ran this against a PBF from geofabrik.de but it died on Excel read:
Traceback (most recent call last):
File "osm2mapaction.py", line 73, in <module>
main(args)
File "osm2mapaction.py", line 42, in main
output_dir
File "osm2mapaction.py", line 50, in convert
_raw_conf = raw_config_from_file(raw_config_path)
File "/Users/spike/Documents/MapAction/Code/osm2mapaction/osm2ma/raw_config_loader.py", line 52, in raw_config_from_file
return _excel.get_raw_config()
File "/Users/spike/Documents/MapAction/Code/osm2mapaction/osm2ma/raw_config_loader.py", line 39, in get_raw_config
return namedrange.area2d(clipped=True)
File "/Users/spike/.virtualenvs/osm2ma/lib/python2.7/site-packages/xlrd/book.py", line 288, in area2d
self.dump(self.book.logfile,
AttributeError: 'NoneType' object has no attribute 'logfile'
I guess maybe because this is an xlsx? There's a lib called OpenPyXL which deals with xlsx files pretty well.
(PS- merging #5 first will make this changeset much more succinct)
This is pretty basic but could easily be improved. Might be good to add the xls file to the repo since it seems to be a requirement.