georust / geozero

Zero-Copy reading and writing of geospatial data.
Apache License 2.0
336 stars 33 forks source link

CSV reader/writer #24

Closed michaelkirk closed 2 years ago

michaelkirk commented 2 years ago

Do you think a CSV reader would be worthwhile?

ogr2ogr supports it: https://gdal.org/drivers/vector/csv.html

For example I have a dataset like this:

Address,Type,Datetime,Latitude,Longitude,Report Location,Incident Number
904 7th Av,Car Fire,05/22/2019 12:55:00 PM,47.6069,-122.329051,POINT (-122.329051 47.6069),F190051945
9610 53rd Av S,Aid Response,05/22/2019 12:55:00 PM,47.515984,-122.266529,POINT (-122.266529 47.515984),F190051946

There are multiple ways that the csv might contain geometry data in the wild, some some thought about configuration is due. Two popular ones I've seen are:

  1. If it's a table of points, lat and lon columns are specified.
  2. wkt column

My real world example above actually has both!

pka commented 2 years ago

I use the OGR CSV driver regularly, so yes, it would be worthwile.