mapbox / csv2geojson

magically convert csv files to geojson files
http://mapbox.github.io/csv2geojson/
MIT License
363 stars 82 forks source link

parse lat/lon with a , decimal separator #26

Closed nerik closed 9 years ago

nerik commented 9 years ago

It appears that sometimes software such as Tableau outputs lat/lon pairs with ',' decimal separators (used in french for exemple). This replaces them with a dot separator.

tmcw commented 9 years ago

Can you specify a version of Tableau that does this? It would be really best to fix this issue in the product itself, even if we deal with ambiguous formatting like this in the meantime.

nerik commented 9 years ago

It's Tableau 8.3. I'm not familiar with Tableau so I don't know why the output uses ',' as decimal separators. I suspect it's related to the locale used in Tableau (french), and in that case it's not really an issue but a feature. In my experience it's not uncommon to find datasets from french public agencies with ',' decimal separators. I suppose the proper way to handle that would be to be able to set a locale when using csv2geojson. Or is it overkill?

tmcw commented 9 years ago

I've emailed Tableau: we're going to follow RFC 7159 for csv2geojson rather than supporting locale-formatted numbers: CSV is data, rather than representation, and csv2geojson will be strict about what it accepts.