Skip to content
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

Read GeoJSON #29

Open
jayvdb opened this issue Jul 24, 2017 · 6 comments
Open

Read GeoJSON #29

jayvdb opened this issue Jul 24, 2017 · 6 comments

Comments

@jayvdb
Copy link
Contributor

jayvdb commented Jul 24, 2017

https://github.com/wireservice/csvkit does a really nice job of reading GeoJSON into a CSV with their geojs.py, moving all of the properties into columns.

pyexcel-text has JSON support, which is a bit odd as this is mostly a tabulate-based plugin.

I suspect that geojson support should be in a separate plugin, and maybe it would also support topojson.

@jayvdb
Copy link
Contributor Author

jayvdb commented Jul 24, 2017

c.f. #30 for ndjson and other stream json derivative formats.

@chfw
Copy link
Member

chfw commented Jul 24, 2017

on top of my head, I would imagine a pyexcel-schema component to be created first to do semantic parsing. And then based on that, pyexcel-geojson could be written to specify persistent format(or layout) using tabular data structure.

@chfw
Copy link
Member

chfw commented Jul 24, 2017

being json format, pyexcel-geojson could be put under pyexcel-json as future version so as to minimze the number of package.

@chfw
Copy link
Member

chfw commented Jul 26, 2017

Could you please also shred the light on what you could use the geojson reading capability for? What I could see is to do transcoding from geojeson to csv, xls, etc.

@jayvdb
Copy link
Contributor Author

jayvdb commented Jul 26, 2017

My use case is BesutKode/uni-task-2#12 ; I want to sort the GeoJSON, so that this file format is git-friendly during PRs.

I will also want to do filtering of unneeded features, later.

I dont need a schema; I am quite happy with the complex objects being blobs in the CSV. I've made quite good progress in round-tripping the GeoJSON with csvkit : wireservice/csvkit#868 - only a few remaining issues.

@chfw
Copy link
Member

chfw commented Jul 28, 2017

I had a read on the geojs.py. I don't think dumping the geometry object as a json string is useful at all. In a excel software, that string is too long to fit in a cell, hence hard to read. So I think the geometry field is mostly ignored. My question is: if the other fields in geojson are of interest, why not skipping the blob? The only reason to have it is to re-construct the geo json back but csv is not a good format. Multi polygon has 4 dimensional array. I am still wondering how I put it in csv format if I am not doing simple json dump.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants