[Om2008.9] updating OSM data for tangoGPS

Matthias Apitz guru at unixarea.de
Thu Feb 5 14:52:55 CET 2009


El día Thursday, February 05, 2009 a las 01:48:20PM +0100, Stefan Fröbe escribió:

> >
> > My script as well honours the existence of a file '.../OSM/lastrun' and one
> > can just create this file with
> >
> > $ touch -t 02050724  lastrun  ## MMDDHHMM
> >
> > to exclude, in this example, all tiles which are already newer then
> > February 5, 7:24;
> > for example if you have to restart the script during a day;
> 
> 
> Hi Matthias,
> 
> neat little script for this great idea - I cleaned the output a little,
> added a simple "progress" and updated a tile's timestamp when it was checked
> sucessfully - now all that's needed is a little parallel wget to speed
> things up ;-)
> 
> Stefan

Hi Stephan,

Thanks for updating it (I have no time to check it now, will come back
later to this);

just a note; I did already a change in my CVS because sometimes the wget
fails and let the file with zero bytes, i.e. it is better to let in this
case the old file remain; the logic is like this:

       wget --user-agent yaouh.sh -q ${baseURL}${file} -O /tmp/tile.$$ 
       test -s /tmp/tile.$$ && {
           cat /tmp/tile.$$ > ${file}
           printf "updated\n"
       }

HIH

	matthias
-- 
Matthias Apitz
Manager Technical Support - OCLC GmbH
Gruenwalder Weg 28g - 82041 Oberhaching - Germany
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e <matthias.apitz at oclc.org> - w http://www.oclc.org/ http://www.UnixArea.de/
b http://gurucubano.blogspot.com/




More information about the community mailing list