NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

2
1

Greetings!

I'm working on tracing some underground pipelines, and I'm using an Overpass XML script (via overpass turbo) to bring existing map nodes, ways, and relations (man_made=pipeline) in to JOSM to build upon. Some pipelines have existing (and inaccurate) TIGER data for various segments. Unfortunately, the TIGER data frequently has nodes which are shared with other map elements such as roads, political borders, rivers, etc. etc. When I delete these TIGER pipeline ways after replacing them, the shared nodes throw conflict warnings because JOSM wasn't aware of their shared nature.

I need some assistance in crafting an Overpass XML script which will include not only the (man_made=pipeline) ways, but also any ways which are "shared" by the nodes I retrieve in the process. That way, when I delete the TIGER pipeline after its been replaced, any other element which may share a node is there and remains intact, causing no conflicts.

Are there any experts who can lead me down the right path for this? I'd appreciate it greatly!

asked 02 Jan '14, 15:34

greggerm's gravatar image

greggerm
45225
accept rate: 0%


After you have selected the ways, you probably have a <recurse type="down" /> (or equivalent) statement to get the nodes. You can than continue to select their parents with something like <recurse type="up" />. I'd suggest something like the following:

<union>
  … select pipeline ways …
  <recurse type="down"/>
  <recurse type="up" />
  <recurse type="down" />
</union>
<print mode="meta" />

(The last recurse-down makes sure that the "shared" ways also get loaded completely.)

permanent link

answered 02 Jan '14, 15:58

tyr_asd's gravatar image

tyr_asd
1.2k51927
accept rate: 64%

Bingo. I had to make some adjustments to account for my poor script writing, but adding the new up/down has accomplished the goal. Thanks so much!

(02 Jan '14, 17:12) greggerm

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×483
×84

question asked: 02 Jan '14, 15:34

question was seen: 8,141 times

last updated: 02 Jan '14, 17:12

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum