Talk:Osmdiff
fix german "Umlauts"
since i am from Düsseldorf it bothered me :) --Oswolf 15:21, 21 November 2008 (UTC)
diff osmdiff.pl osmdiff-de.pl 22a23 > use Encode; 980c981 < #print "place found: $id $name $lon $lat\n" ; --- > print "place found: $id $name $lon $lat\n" ; 1244c1245 < $image->string(gdSmallFont, $x1, $y1, $place_name{$key}, $black) ; --- > $image->string(gdSmallFont, $x1, $y1, encode("iso-8859-1", decode("utf8", $place_name{$key})), $black) ;
Great, thanks! Will be published with version 2 which is nearly ready. Gary68
add links to www.openstreetmap.org
diff osmdiff.pl osmdiff-neu.pl
372c372
< print $html_file "<strong>", $key, "</strong> - ", $#{$way0_nodes{$key}}, " nodes. Tags: " ;
---
> print $html_file "<strong>", weblink("way", $key), "</strong> - ", $#{$way0_nodes{$key}}, " nodes. Tags: " ;
397c397
< print $html_file $key, " by user ", $way1_user{$key}, "</strong>: " ;
---
> print $html_file weblink("way", $key), " by user ", $way1_user{$key}, "</strong>: " ;
424c424
< print $html_file "<strong>", $key, " by user ", $way1_user{$key}, "</strong> - " ;
---
> print $html_file "<strong>", weblink("way", $key), " by user ", $way1_user{$key}, "</strong> - " ;
464c464
< print $html_file "<strong>", $key, "</strong> - \n" ;
---
> print $html_file "<strong>", weblink ("way", $key), "</strong> - \n" ;
564c564
< print $html_file "<td>$key</td>\n" ;
---
> print $html_file "<td>" . weblink("way", $key) . "</td>\n" ;
617c617
< print $html_file $key, "</strong>: " ;
---
> print $html_file weblink("node", $key), "</strong>: " ;
642c642
< print $html_file $key, " by user ", $node1_user{$key}, "</strong>: " ;
---
> print $html_file weblink("node", $key), " by user ", $node1_user{$key}, "</strong>: " ;
671c671
< printf $html_file "%i distance = ~%.1i (m)</strong> (tags from old data): ", $key, $dist ;
---
> printf $html_file "%s distance = ~%.1i (m)</strong> (tags from old data): ", weblink("node", $key), $dist ;
769c769
< print $html_file "<td>$key</td>\n" ;
---
> print $html_file "<td>" . weblink("node", $key) . "</td>\n" ;
1315a1316,1319
> sub weblink {
> my ($type, $key) = @_;
> return "<a href=\"http://www.openstreetmap.org/browse/$type/$key/history\">$key</a>";
> }
TNX, will do! Gary68
Nice to have
It would be great if we could rejig the code to allow the script to analyse change files (.osc) rather than relying on comparing two large files. However, this would probably require Osmosis or other utility to have the ability to do a bounding box for a changefile, which I don't think is currently possible. (Steve)
Hm, but where to get the underlying information? The gray ways? And the complete tag lists to identify which object has been modified (aside from the ids which I suppose nobody knows from memory :-) )?. Gary68
Patch to fix osm.bz2 read in Ubuntu 8.10
852,855c852,855
< if ($name =~ /\.bz2$/) {
< require PerlIO::via::Bzip2;
< open ($file, "<:via(Bzip2)", $name) ;
< } else {
---
> if ($name =~ /\.bz2$/) {
> require IO::Uncompress::Bunzip2;
> open $file, "bunzip2 -c $name |" ;
> } else {
Running perl v5.10.0 and libio-compress-bzip2-perl_2.011-1_all.deb. Not sure how compatible this patch is to other distributions. --Nifgraup 00:55, 19 February 2009 (UTC)
- OK thanks. Will update version soon! --Gary68 07:17, 19 February 2009 (UTC)
Providing this to less experienced users
Hi. Can't you provide this diff feature to less experienced users who just like to compare all changes between two changesets? It would be cool if you could provide this as a webservice so nobody has to install perl and stuff, just use your webbrowser. Moreover it would be super cool if one can click on certain changes and mark them for revert and at the end just push a button to revert all marked items.
What do you think?
- I think this is a nice idea but I can't implement it. For several reasons.
- I would need a BIG server with a lot of storage
- I would need to know about interactive web programming
- Reverting possible that easy for everybody would surely result in edit wars...
- By the way: On a Linux machine perl is installed by default and you are more or less ready to go. You just need a library and a perl module
Gary68...
Providing shape file background
This would be great to have also a the borders shapefile rendered as a background on the png. Does *.shp rendering could be implemented in perl? --Yvecai 20:04, 21 December 2011 (UTC)