grass
grass copied to clipboard
v.distance: add JSON support
Using parson, add JSON support to v.distance module.
The output looks like as follows:
[
{
"from_cat": 1,
"to_cat": 33,
"distances": [
{
"value": 54371.188688694157,
"name": "dist"
},
{
"value": "Zebulon",
"name": "to_attr"
}
]
},
{
"from_cat": 8,
"to_cat": 18,
"distances": [
{
"value": 284.67149902717813,
"name": "dist"
},
{
"value": "RFD #14",
"name": "to_attr"
}
]
}
]
I will add tests and update documentation once the JSON format is finalized.
@cwhite911 the pr is ready for review.
@cwhite911 the PR will automatically merge once all conditions are met, that means that there's only open conversations remaining
@cwhite911 the PR will automatically merge once all conditions are met, that means that there's only open conversations remaining
@echoix I don't see a button to resolve conversations anymore. Did a setting recently get changed?
Oh, maybe you don't even have triage access for the grass repo but maybe others? It's surprising..
Comment like done on them, to make sure we don't forget some, and I'll close them
cc @neteler can you take a look at what level he should be having (especially if he was mentoring students, and couldn't approve them himself). Since last summer at least I was approving his grey-approvals, like a proxy, to unblock PRs
Done!
This triggered:
*** CID 1590732: Memory - illegal accesses (UNINIT)
/vector/v.distance/print.c: 109 in print_upload()
103 }
104 else {
105 json_object_set_null(relation_object, "value");
106 }
107 break;
108 }
>>> CID 1590732: Memory - illegal accesses (UNINIT)
>>> Using uninitialized value "name" when calling "json_object_set_string".
109 json_object_set_string(relation_object, "name", name);
110 json_array_append_value(relations, relation_value);
111 break;
112 case PLAIN:
113 switch (Upload[j].upload) {
114 case CAT: