This repository has been archived by the owner on Sep 23, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Make edge list an edge map #32
Comments
What's the argument for the change? It's more compact, but losing the "id" "toid" makes the data a little too cryptic for my taste. |
The argument is very similar to the crosswalk change already implemented. Keeping a list of objects requires iteration of the list to find a s single element, whereas bringing the local It could look more like the crosswalk and still not require iterating: {
"cat-27": {
"toid": "nex-26"
},
"cat-52": {
"toid": "nex-34"
},
"cat-67": {
"toid": "nex-68"
}
} |
OK -- we can do this. I wonder if there's a better form for topology though? Is this a pressing need or can I back burner? |
Obviously pressing, can't you tell? |
catchment_edge_map.json
{
"cat-8895442": "nex-250031932",
"cat-8895520": "nex-250031930",
"cat-8895396": "nex-250031903",
"cat-8895402": "nex-250031930",
"nex-250031932": "cat-8895402",
"nex-250031930": "cat-8895396",
"nex-250031903": "cat-0"
} or: catchment_edge_map.json
{
"cat-8895442": {
"toid": "nex-250031932"
},
"cat-8895520": {
"toid": "nex-250031930"
},
"cat-8895396": {
"toid": "nex-250031903"
},
"cat-8895402": {
"toid": "nex-250031930"
},
"nex-250031932": {
"toid": "cat-8895402"
},
"nex-250031930": {
"toid": "cat-8895396"
},
"nex-250031903": {
"toid": "cat-0"
}
} |
I would go with the first form: catchment_edge_map.json
{
"cat-8895442": "nex-250031932",
"cat-8895520": "nex-250031930",
"cat-8895396": "nex-250031903",
"cat-8895402": "nex-250031930",
"nex-250031932": "cat-8895402",
"nex-250031930": "cat-8895396",
"nex-250031903": "cat-0"
} To enforce a 1-1 mapping. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The
*_edge_list.json
files generated are lists of edge mappings:This is really just a map, and would likely be better suited for look ups if structured as one:
The text was updated successfully, but these errors were encountered: