[OSM-dev] What do we do with tags with empty keys or values?

Chris Jones rollercow at sucs.org
Thu May 31 09:27:19 BST 2007


On 31 May 2007, at 08:29, Hakan Tandogan wrote:
> I thought about a script that would fetch those objects, remove the  
> empty
> tags and write them back via the API, but some of them result  
> repeatedly
> in the error 500...


I wrote a script last night to unlink nullsegments from ways so they  
can be deleted.

http://projects.sucs.org/svn/osm/null-segment/nullSegmentUnlinker.py  
is the unlinker it may save you some work.

http://projects.sucs.org/svn/osm/null-segment/findNullSegments.py is  
its partner, which finds first null segments and then ways containing  
them in planet.osm.

I run the unlinker interactively using the following...

---

import nullSegmentUnlinker
import time
ways = file('wayswithnullsegids').readlines()
ways = [id.strip() for id in ways]

for id in ways:
	nullSegmentUnlinker.removeNullSegmentFromWay(id)
	time.sleep(1)

--

So onto a question...

http://sucs.org/~rollercow/temp/nullsegids contains all 7786 (as of  
yesterdays planet) null segment id's which should be deleted, does  
anyone with access want to remove them straight from the database or  
do I use the API?

--
Chris Jones, SUCS Admin
http://sucs.org






More information about the dev mailing list