Skip to content

Commit

Permalink
in2csv supports GeoJSON files with missing Point coordinates, #871
Browse files Browse the repository at this point in the history
  • Loading branch information
James McKinney committed Jan 28, 2018
1 parent e9dd92f commit c052d15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion csvkit/convert/geojs.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def geojson2csv(f, key=None, **kwargs):
geometry_type = geometry.get('type')
else:
geometry_type = None
if geometry_type == 'Point':
if geometry_type == 'Point' and 'coordinates' in geometry:
longitude, latitude = geometry['coordinates']
else:
longitude, latitude = (None, None)
Expand Down

0 comments on commit c052d15

Please sign in to comment.