[OSM-talk] Huge batch of 1hz Mexico/Central America data
Beau Gunderson
beau at beaugunderson.com
Sun May 11 17:13:53 BST 2008
Excellent suggestions everyone, I wouldn't have known about tying up the
upload queue otherwise.
I may convert Richard's Perl to Python and upload using that with a
delay--once I get to somewhere that has faster internet access, that is. :)
Also, I hope OSM has a tag for "the worst road on planet Earth" because I
think I found it yesterday from the Belize border to Tikal in Guatemala...
Beau
On Sat, May 10, 2008 at 3:44 AM, Richard Fairhurst <richard at systemed.net>
wrote:
> Beau Gunderson wrote:
>
> I've driven to Belize City from Seattle with a 1hz GPS logger and am
> wondering the best way to upload the data to OSM.
>
> You can see the route here:
>
> http://www.bylandandsea.org/map
>
> I've got it in GPX files that are each a day's drive long and also as one
> giant GPX (180mb or so at current count).
>
> Should I use the web upload feature or is there an easier way to do batch
> uploads? Upload the gigantic file or all of the small ones?
>
>
> Looks great.
>
> Agreed with Lauri that you should avoid uploading the gigantic file
> because it'll block the server for others.
>
> You can certainly use the batch upload scripts that DT pointed to.
> However, it would be kind to only upload five or so at a time, and wait for
> them to finish before uploading any more. Uploading a lot at once blocks the
> queue for others and can make you very unpopular when everyone is trying to
> upload their weekend's work!
>
> If you don't mind a bit of Perl, you can upload a GPX to OSM like this:
>
> use HTTP::Request::Common;
> use LWP::UserAgent;
>
> $ua=LWP::UserAgent->new;
> $ua->credentials('www.openstreetmap.org:80 <http://www.openstreetmap.org/>','Web
> Password',$yourusername, $yourpassword);
>
> $response=$ua->request(POST '
> http://www.openstreetmap.org/api/0.5/gpx/create',
> Content_Type => 'form-data',
> Content => [ file =>[$filename],
> description=>$description,
> tags =>$tags,
> public =>"1" ] );
>
> if ($response->code==200) {
> # yay, success
> } else {
> # boo, failure
> }
>
> ...from which a batch uploader (again, perhaps pausing every so often) can
> be very easily constructed.
>
> cheers
> Richard
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk/attachments/20080511/630d6f93/attachment.html>
More information about the talk
mailing list