Here's my modifications to the code... The original code will fail on lines like this:
critical_address_file_us.csv:"3424 Peachtree Rd, NE",US,GA,Atlanta,30326,3424,3424,33851200,-84363500 critical_address_file_us.csv:"3424 Peachtree Road, NE",US,GA,Atlanta,30326,3424,3424,33851200,-84363500 Because it doesn't take into account the quoting when splitting the file. Using the csv module takes care of that. I was also getting some invalid XML so I switched to using LXML to build the XML to ensure well-formedness. The files are small enough that building the whole XML tree in memory isn't a problem. I also perform a few data cleanups as well and split the US out into individual states. One thing that I noticed about the data is that there are several Canadian addresses in the US file. -- Jeff Ollie
mqcaf_to_osm.py
Description: application/download
_______________________________________________ talk mailing list [email protected] http://lists.openstreetmap.org/listinfo/talk

