-
Notifications
You must be signed in to change notification settings - Fork 604
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
Round-trip GeoJSON #868
Comments
After a bit of fiddling, I now have a diff for the round-tripping of the 20Mb data file I am interested in, and there are only four distinct sets of changes, all of them problematic. @@ -598962,7 +598965,7 @@
"id": "way/93984451",
"properties": {
"@id": "way/93984451",
- "mooring": "yes",
+ "mooring": true,
"natural": "coastline",
"source": "Yahoo hires"
},
@@ -1167190,7 +1167193,6 @@
"properties": {
"@id": "node/259453536",
"amenity": "swimming_pool",
- "covered": "no",
"horse": "destination",
"name": "Pantai Sigandu",
"sport": "swimming"
@@ -1167280,7 +1167282,7 @@
"@id": "node/1551798713",
"name": "Wind Jammer Beach",
"natural": "beach",
- "wheelchair": "yes",
+ "wheelchair": true,
"wheelchair:description": "Kein Behinderten-WC"
},
"geometry": {
@@ -1167430,7 +1167430,7 @@
"properties": {
"@id": "node/3902525069",
"addr:city": "Nusa Penida",
- "addr:housenumber": "1",
+ "addr:housenumber": true,
"addr:postcode": "80771",
"addr:street": "Desa Jl. Batu Nunggul",
"name": "Nusa Garden Bungalow", |
What if you run it with |
(ftr, |
Cool, leaving open as a meta-issue for the other issues. |
I added a |
I would like to be able to round-trip GeoJSON through csvkit, so that small operations can be done using csvkit in the middle, without resulting in strange diffs. #867 is part of this effort.
i.e. The following should have very minimal output.
Some of the diff results which need to be controllable using command line args:
geometry
appear beforeproperties
or the opposite. It seems different tools make different choices for this ordering, and ideallyin2csv
can annotate its output with this ordering (assuming it is consistent throughout the input) so that csvjson can re-use the same ordering.in2csv
adds a column when it sees a new property, which doesnt work well if many properties do not exist on the firstFeature
, but appear in latter nodes. Sorting could be a feature of in2csv orcsvjson
bbox
. It should be possible to disable this being computed and added, and it is non-trivial to compute it for complex geojson (c.f. csvjson: Support types other than Point #867).After simplistic solutions for those three, the diff looks like:
The change to
"Coffee"
is concerning (and maybe there is a command line arg which would prevent that), but the rest of those changes are IMO a good "linted" output.The text was updated successfully, but these errors were encountered: