Last change
on this file since 36235 was 36235, checked in by taylor.smock, 12 months ago |
See #23584: Add non-regression test for changeset 97259223
Note: The test currently fails since the problem hasn't been fixed yet.
|
File size:
907 bytes
|
Line | |
---|
1 | # Regression Readme
|
---|
2 | ## Generating nodes.json, ways.json, and relations.json
|
---|
3 | In order to generate these jsons, you will want a list of the objects. You can
|
---|
4 | get this by selecting the objects in JOSM and copying them.
|
---|
5 |
|
---|
6 | Example:
|
---|
7 |
|
---|
8 | ```
|
---|
9 | node 1
|
---|
10 | node 2
|
---|
11 | ```
|
---|
12 |
|
---|
13 | **Warning**: JOSM will not copy deleted objects to clipboard.
|
---|
14 |
|
---|
15 | Once you have the list, you can run the following command:
|
---|
16 | ```shell
|
---|
17 | # Note: `pbpaste` is for mac, `xclip -selection clipboard -o` is for x11 linux, and `wl-paste` (from `wl-clipboard`) is for linux wayland
|
---|
18 | $ wl-paste | \
|
---|
19 | awk '{print "https://api.openstreetmap.org/api/0.6/" $1 "/" $2 "/history.json" " -o " $1 "_" $2 ".json"}' | \
|
---|
20 | xargs curl -L
|
---|
21 | $ jq -s '.[0].elements=([.[].elements]|flatten)|.[0]' node_*.json > nodes.json
|
---|
22 | $ jq -s '.[0].elements=([.[].elements]|flatten)|.[0]' way_*.json > ways.json
|
---|
23 | $ jq -s '.[0].elements=([.[].elements]|flatten)|.[0]' relation_*.json > relations.json
|
---|
24 | ```
|
---|
Note:
See
TracBrowser
for help on using the repository browser.