[osmosis-dev] Merge multiple files

Jaromír Mikeš mira.mikes at seznam.cz
Mon Oct 14 04:29:50 UTC 2013


Od: Jaromír Mikeš <mira.mikes at seznam.cz>
"
Od: Frederik Ramm <frederik at remote.org>



"Here's a wrapper script I use to combine multiple osc files (called like
"./myscript.sh *.osc > foo.osc"):

#!/bin/bash

CMDLINE=`
echo "--read-xml-change $1"
echo "--sort-change"
shift
while [[ $# > 0 ]]
do
echo "--read-xml-change $1"
echo "--sort-change"
echo "--merge-change"
echo "--sort-change"
shift
done
echo "--simc"
echo "--write-xml-change -"
`

/srv/osmosis/bin/osmosis $CMDLINE"
"



Trying here modify it to merge osm files but not successful :(




#!/bin/bash

CMDLINE=`
n=0
echo "--rx $1"
shift
while [[ $# > 0 ]]
do
echo "--rx $1"
n=$(( $n + 1 ))
shift
done
x=1
n=$(( $n - 1 ))
while [ $x -le $n ]
do
echo "--merge"
x=$(( $x + 1 ))
done
shift
echo "--wx"
`

/usr/bin/osmosis $CMDLINE




-----------------




Any help?




mira

"
""
"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osmosis-dev/attachments/20131014/4a74a1cc/attachment.html>


More information about the osmosis-dev mailing list