-
Notifications
You must be signed in to change notification settings - Fork 0
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
errors in GeoJSON to JSON conversion #83
Comments
Firstly acknowledging the sample code is wrong - it wasn't updated when we changed our thinking about multiple files. I think it should be (not tested):
|
Ah, I don't have access to the original GeoJSON data but looking at the outputted JSON I can make a guess. In the first span it's
Note, the value for the start key is not a dict - it's a string of the JSON representation of a dict! Has the value somehow been accidentally string-ifyed in the input data? This is maybe something we could try and catch and fix in the converter, if this is a common problem |
That was the hint I needed, thank you! I was using json.loads instead of json.load. Your revised sample code works for me. :-) |
We should fix our docs - can we leave this issue open to track that task? |
lib-cove-ofds installs fine and I am able to use the command-line version of it to convert GeoJSON nodes and spans files into a single valid JSON file. However, when I attempt to use it in a python script, I run into problems. The sample code which suggests the following line triggers an error.
worker.process_data(nodes_data, spans_data)
process_data doesn't appear to accept two arguments. I am able to run it sequentially i.e.
worker.process_data(nodes_data)
worker.process_data(spans_data)
The result produces a valid JSON file but not valid OFDS. It produces spans with node references that cannot be resolved. Temporary link to COVE output. I am not sure what I am doing wrong.
The text was updated successfully, but these errors were encountered: