-
Notifications
You must be signed in to change notification settings - Fork 3
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
GeoJSON publication format: consider a single file that contains nodes and spans #207
Comments
I'm interested in sitting down and seeing if we can come up with rules for "given this Feature, is it most likely to be a Node or a Span? I'll continue validating and processing the feature based on that guess". If we can crack that, then we could have 1, 2 or multiple GeoJSON files. People could choose to run JSON->GeoJSON and get any number of files, splitting by things like network, phase or any other field. We would reduce the scope for errors when getting input files (eg Open-Telecoms-Data/lib-cove-ofds#21 ) |
That sounds good, but only |
My first thought was there would be something we could do, but now I look again .....
I think for reliable 100% rules, we will need to add a field. |
Feedback from the World Bank's infrastructure map team is that GeoJSON is their preferred format for ingesting data because of the simplicity of it being a single file so I think we do want to pursue making the GeoJSON format a single file. |
Agreed, I think that this is the approach that we'll pursue. |
Looking into this further I'm unsure whether a single GeoJSON file is the right approach. A single file would present problems for users of at least QGIS (and any other software that uses GDAL) and ArcGIS:
One thing that feels wrong about the current GeoJSON publication format, is the lack of a means to specify which file contains the nodes feature collection and which contains the spans feature collection. In the example data, we handle this by naming the file ( {
"type": "FeatureCollection",
"featureType": "nodes",
"features": []
} @odscjames @stevesong what do you think? The following are my initial notes on the changes that we'd need to make to have a single GeoJSON file, before I came across the issues documented above. We have two decisions to make about the field that we need to add to indicate whether a feature is a node or span: Where to add the fieldThere are two options :
Based on the following note from the GeoJSON specification, I think option 1. is preferable:
If we pursue option 1, we'll need to add a What to name the fieldIf we add the field as a child of |
I haven't looked at QGIS etc as much as you so don't have more to add there. That is very interesting. The other option is to carry on with the plan to add a field on each feature object and then allow people flexibility to work with one or more files as they choose. Cove/tooling by default could output 2 files "nodes"/"spans" but give the users options to choose 1 file or even more files (so they didn't get any single file that's to big, or get separate files filtered by a variable they choose like status). Cove/Tooling could accept 1 to many files as input and any file could go in any input so users wouldn't have to worry about putting the right file in the right place. If someone ended up with one file when they needed it split into 2 (because of QGIS etc) there could be a tool to split the file for them. We don't need to do all this tooling straight away; we can start by leaving everything working on 2 files, but putting the new field on the feature level instead of on the file level enables us to do this later. |
Good points :-) I agree that adding the field at the feature level is the best option for future flexibility. We can then update the documentation to make separate files a 'should' rather than a 'must' and update CoVE to rely on the new field rather than which file is uploaded in which box. Sound good? |
Yes! |
From Open-Telecoms-Data/cove-ofds#5 (comment):
cc @odscjames @lgs85
The text was updated successfully, but these errors were encountered: