osmlab/nycbuildings — pull request #115 by lxbarth (2014-02-09 23:30:05+00:00)
Title: Separate merging from converting

Breaks merging into a separate step from converting.

Instead of merging addresses into buildings and converting them to osm in one step (`convert.py`), merge first addresses into buildings, write them as geojson files into a `merged/` directory (`merge.py`) and then convert them in a separate step from geojson to osm format (`convert.py`).

This isolates the conversion step further allowing for faster iteration, being able to modify and rerun conversions cheaply foregoing the expensive merge step. This separation also creates easy to use geojson files that come in handy for debugging.

Quick benchmark comparing user time spent on convert.py including the merge step (currently) and excluding the merge step (this PR).

district id | including merge step | excluding merge step
---|---|---
52024 | 0m1.101s | 0m0.405s
52025 | 0m0.885s | 0m0.250s
52026 | 0m1.631s | 0m0.752s
52027 | 0m3.185s | 0m1.553s
52028 | 0m1.527s | 0m0.454s
52114 | 0m2.422s | 0m1.119s
52115 | 0m2.926s | 0m1.033s
53052 | 0m1.561s | 0m0.632s
54052 | 0m5.132s | 0m1.385s
55052 | 0m0.474s | 0m0.070s