Skip to main content
Post Closed as "Duplicate" by PolyGeo
deleted 16 characters in body; edited title
Source Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

convert Converting csv to kml or geojson, etc/geojson using ogr2ogr or equivalent command line tools (use "latitude" and "longitude" attributes for coordinates)?

I've just unsuccessfully tried to use ogr2ogr to convert CSV into KML like so:

ogr2ogr -f "KML" output.kml input.csv

The csv has "latitude" and "longitude" columns.

The attributes are all loaded but if you inspect the KML's text, the Coordinate elements are not being added so its not working.

I feel like this will work if I can inform gdal to interpret certain columns ("latitude", "longitude") as coordinates. 

How might I do this?

Thanks

convert csv to kml or geojson, etc using ogr2ogr or equivalent command line tools (use "latitude" and "longitude" attributes for coordinates)

I've just unsuccessfully tried to use ogr2ogr to convert CSV into KML like so:

ogr2ogr -f "KML" output.kml input.csv

The csv has "latitude" and "longitude" columns.

The attributes are all loaded but if you inspect the KML's text, the Coordinate elements are not being added so its not working.

I feel like this will work if I can inform gdal to interpret certain columns ("latitude", "longitude") as coordinates. How might I do this?

Thanks

Converting csv to kml/geojson using ogr2ogr or equivalent command line tools?

I've just unsuccessfully tried to use ogr2ogr to convert CSV into KML like so:

ogr2ogr -f "KML" output.kml input.csv

The csv has "latitude" and "longitude" columns.

The attributes are all loaded but if you inspect the KML's text, the Coordinate elements are not being added so its not working.

I feel like this will work if I can inform gdal to interpret certain columns ("latitude", "longitude") as coordinates. 

How might I do this?

edited title
Link
boulder_ruby
  • 1.8k
  • 4
  • 27
  • 44

convert csv to kml or geojson, etc using ogr2ogr or equivalent command line tools (use "latitude" and "longitude" attributes for coordinates)

Source Link
boulder_ruby
  • 1.8k
  • 4
  • 27
  • 44

convert csv to kml or geojson, etc using ogr2ogr (use "latitude" and "longitude" attributes for coordinates)

I've just unsuccessfully tried to use ogr2ogr to convert CSV into KML like so:

ogr2ogr -f "KML" output.kml input.csv

The csv has "latitude" and "longitude" columns.

The attributes are all loaded but if you inspect the KML's text, the Coordinate elements are not being added so its not working.

I feel like this will work if I can inform gdal to interpret certain columns ("latitude", "longitude") as coordinates. How might I do this?

Thanks