source: subversion/applications/rendering/gosmore/appendOSBtoOSM.sh @ 15977

Last change on this file since 15977 was 15977, checked in by daviddean, 10 years ago

Added support for adding openstreetbugs to gosmore through the appendOSBtoOSM.sh script. Currently hard-coded to OSB in Brisbane, Australia. Should probably make more flexible.

  • Property svn:executable set to *
File size: 738 bytes
Line 
1#!/bin/bash -u
2
3# this is an example script for adding openstreetbugs to a osm pak file
4# usage: bzcat planet-extract.osm.bz2 | appendOSBtoOSM.sh | gosmore rebuild
5
6tempfolder=$(mktemp -d)
7
8# this particular example grabs bugs around the brisbane area.
9# change this url to the gpx export for your area
10url='http://openstreetbugs.schokokeks.org/api/0.1/getGPX?b=-27.60787&t=-27.28064&l=152.69114&r=153.30363&open=yes'
11
12wget --quiet $url \
13    -O $tempfolder/OSB.gpx
14
15# convert to osm format using gpsbabel
16gpsbabel -i GPX -f $tempfolder/OSB.gpx \
17    -o osm,tagnd="openstreetbug:yes" -F $tempfolder/OSB.osm
18
19# concatenate with existing osm file
20egrep -v '^</osm' /dev/stdin
21egrep -v '^<(osm|\?xml)' $tempfolder/OSB.osm
22
23rm -r $tempfolder
Note: See TracBrowser for help on using the repository browser.