[OSM-talk] Question about automatic data upload
Robert Hart
Robert.Hart at BuroHappold.com
Tue Sep 12 12:07:59 BST 2006
> On 9/12/06, Robert Hart <Robert.Hart at burohappold.com> wrote:
> <snip>
> 1 name
>
> This doesn't look right. There should be lots of name tags.
>
> Etienne
Nope, I'm merely looking at values of the "highway" (and related
misspellings) tag.
See rudimentary perl script below. In other words there is an item tagged
"highway"="name".
I couldn't see source for any bots in svn, or find any reference to them in
the wiki. Where could I find one?
Rob
----
#!/usr/bin/perl
while ($l=<>) {
$n++;
if ($l=~/k=\"(.*[Hh][Ii].*[Ww][Aa][Yy])\".*v=\"([^\"]*)\"/) {
$w++;
$tag{$1}++;
$highway{$2}++;
}
if($n%100000==0){
print STDERR "line: $n way: $w\n";
}
}
print STDERR "line: $n way: $w\n";
foreach $k (sort( {$highway{$a} <=> $highway{$b};} keys(%highway))){
print "$highway{$k}\t$k\n";
}
foreach $k (sort( {$tag{$a} <=> $tag{$b};} keys(%tag))){
print "$tag{$k}\t$k\n";
}
This message has been scanned for viruses by MailControl - www.mailcontrol.com
More information about the talk
mailing list