Open musuruan opened 9 years ago
@musuruan Hello Andrea, I am really glad to see the csv2osm script being used outside the Montreal community.
Thanks for your patch. I'll definitively be looking into it shortly. I want to create a new GitHub project for csv2osm, and I'll integrate the changes then.
A few points regarding the code:
--ignore-rows-missing-coordinates
or similar, with code like this:def generate_node_xml(row, args, translator):
if args.ignore_rows_missing_coordinates:
if args.longitude_field not in row or args.latitude_field not in row:
return None
And handle the None in the main loop:
node_xml = generate_node_xml(row, args, translator)
if node_xml:
output.write(node_xml)
@musuruan In all cases, do you have a sample file that can be used to reproduce the issues you have?
Hi Guillaume, I just moved the "\n" character because I didn't want empty line in the output osm file. I didn't do any performance check.
It is fine for me if you have a command line switch to ignore missing coordinates.
You can find here the script I used with csv2osm: https://dl.dropboxusercontent.com/u/12575912/torino.py
It is not yet ready for import. Anyway it works. At the beginning of the file you can read where to download the source csv file.
Hi, I'm using csv2osm to prepare the Turin address data import.
At present, csv2osm fails because:
Therefore I created the following patch to fix these issues: https://dl.dropboxusercontent.com/u/12575912/torino.diff
I hope you can merge it.