source: osm/applications/editors/josm/plugins/reverter/test/data/regress/README.md@ 36235

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
3In order to generate these jsons, you will want a list of the objects. You can
4get this by selecting the objects in JOSM and copying them.
5
6Example:
7
8```
9node 1
10node 2
11```
12
13**Warning**: JOSM will not copy deleted objects to clipboard.
14
15Once 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.