mapbox / csv2geojson

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

Support for single coordinates field #16

Closed bmcbride closed 10 years ago

bmcbride commented 10 years ago

I'm trying to use csv2geojson with a standard CSV export from the Memento Database Android app. The export stores coordinates in a single field with the lat and long separated by a colon (42.719765710136365:-73.79929259419441). Is there any way to currently handle this? Thanks!

tmcw commented 10 years ago

Hm, not at the moment. Where do people come up with these bizarre latlng encodings...

bmcbride commented 10 years ago

Ha! Although a single coordinate field with a defined delimiter might not be that unusual of a scenario. The beauty of csv2geojson is that it allows you to take arbitrary data exports (from an asset management system for example) and easily incorporate them into a web map. Thanks for looking into it!

tmcw commented 10 years ago

Yeah... unfortunately it's not really possible to auto-detect and parse arbitrary encodings. I think I've got to make some kind of qualification here - maybe 'if it has a spec / documentation, or if it has 1M+ users, it's supported here' - otherwise it's a complexity bomb.

bmcbride commented 10 years ago

Understood. I'll just use a little PHP to handle this one: https://github.com/bmcbride/PHP-Database-GeoJSON/blob/master/simple_points/csv_points_geojson.php