-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
csv writer #36
csv writer #36
Conversation
] | ||
}); | ||
|
||
let expected_output = r#"geometry,address,datetime,incident number,type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note the column order here is different from what's listed in the geojson. By default geojson doesn't keep it's properties ordered. The underlying serde_json crate offers this as an optional feature. I opened an issue to discuss exposing it in geojson here: georust/geojson#187
I'm not totally sure we'd want to use it, but it might be a nice option since we have a concept of "property idx" in some data formats.
} | ||
} | ||
|
||
impl GeomProcessor for BufferingWktWriter { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All this explicit delegation is kind of tedious. But I'm not sure of a better way to embed the output of WktWriter into the CSVWriter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope these delegations won't be necessary with the event API anymore.
I encountered this with my initial approach (georust#33), and incorporated a work-around in georust#36, but I failed to consistently apply the work-around, so it was still broken for some geometry types.
I encountered this with my initial approach (georust#33), and incorporated a work-around in georust#36, but I failed to consistently apply the work-around, so it was still broken for some geometry types.
Ok, let's try this again (supercedes #33).
FIXES #24
This is a follow up to #30, but for writing CSV's.