-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathcounties-11-district-of-columbia.sh
More file actions
executable file
·35 lines (28 loc) · 1.95 KB
/
Copy pathcounties-11-district-of-columbia.sh
File metadata and controls
executable file
·35 lines (28 loc) · 1.95 KB
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
#!/bin/sh -ex
mkdir -p tmp
mkdir -p out/11
curl -Rs -o tmp/district-of-columbia.osm.pbf -L http://download.geofabrik.de/osm/north-america/us/district-of-columbia.osm.pbf
osmosis --rb tmp/district-of-columbia.osm.pbf \
--tf accept-ways "highway=motorway,motorway_link,trunk,trunk_link,primary,primary_link,secondary,secondary_link,tertiary,tertiary_link,residential,unclassified,road,service,minor,footpath,track,footway,steps,pedestrian,path,cycleway" \
--used-node --tee outputCount=2 \
--tf reject-relations --wb tmp/district-of-columbia-roads.osm.pbf \
--tf accept-relations "network=*" --used-way --used-node \
--tee outputCount=4 \
--tf accept-relations "network=US:I" --used-way --used-node --wb omitmetadata=true tmp/district-of-columbia-routes-A.osm.pbf \
--tf accept-relations "network=US:US" --used-way --used-node --wb omitmetadata=true tmp/district-of-columbia-routes-B.osm.pbf \
--tf accept-relations "network=US:DC" --used-way --used-node --wb omitmetadata=true tmp/district-of-columbia-routes-C.osm.pbf \
--tf accept-relations "network=US:DC:CR" --used-way --used-node --wb omitmetadata=true tmp/district-of-columbia-routes-D.osm.pbf \
osmosis \
--rb tmp/district-of-columbia-routes-A.osm.pbf \
--rb tmp/district-of-columbia-routes-B.osm.pbf \
--rb tmp/district-of-columbia-routes-C.osm.pbf \
--rb tmp/district-of-columbia-routes-D.osm.pbf \
--merge --merge --merge \
--wx tmp/district-of-columbia-routes.osm.bz2
osmosis \
--rb tmp/district-of-columbia-roads.osm.pbf \
--tee outputCount=1 \
--bp completeWays=yes file=polys/11/11001-District-of-Columbia.txt --wx out/11/11001-district-of-columbia-roads.osm.bz2 \
touch -r tmp/district-of-columbia.osm.pbf out/11/*.osm.???
./skeletron-roads.sh tmp/district-of-columbia-roads.osm.pbf out/11 district-of-columbia DC
./skeletron-routes.sh tmp/district-of-columbia-routes.osm.bz2 out/11 district-of-columbia DC