Biểu trưng OpenStreetMap OpenStreetMap

Bash and perl to remove referenced nodes from a delete set

Do h4ck3rm1k3 đăng vào 03 tháng 08 năm 2009 bằng English. Cập nhật lần cuối cùng vào 22 tháng 09 năm 2009.

remove all the referenced nodes from kosovo:
grep ref kosova.osm | cut -d\' -f2| sort -u | grep -e [0-9]> reffed.txt

get all the deleted from my file :
grep delete test2.osm > deletes.osm

now try and run this for one hour:
grep -v -f reffed.txt deletes.osm > unreffed.osm

ok that took too long, write a perl script :
perl removereffed.pl reffed.txt deletes.osm > noreffed.osm

add the header and footer (xml) to the file
cat headerks.psm noreffed.osm footerks.osm > todo.osm

here is the perl script :
UPDATE: moved code out to :
http://bazaar.launchpad.net/~kosova/%2Bjunk/openstreetmapkosova/annotate/head%3A/CleanDelete.pl

testing in progress
osm.org/api/0.6/changeset/2027222

Biểu tượng thư điện tử Biểu tượng Bluesky Biểu tượng Facebook Biểu tượng LinkedIn Biểu tượng Mastodon Biểu tượng Telegram Biểu tượng X

Thảo luận

Đăng nhập để nhận xét