This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Problems counting bridges

0

Hello, for a degree thesis I would like to carry out a census of Italian bridges with the data present from OpenStreetMap, which seem to me quite complete.

I extracted the data with Overpass Turbo and then exported it to uMap.

There are only two problems: 1) Many bridges are counted double because they are part of a two-way street. Is it possible to eliminate one of the two in the count? 2) By extracting the data province by province, the figures do not add up compared to a count made at the national level, because there are many bridges between one province and another. How can I delete duplicates?

Thanks to those who will answer me and happy new year. a

asked 02 Jan '23, 13:05

Fraccio's gravatar image

Fraccio
21112
accept rate: 0%

1

Please post your routine

(02 Jan '23, 13:33) DaveF

One Answer:

0
/*
This has been generated by the overpass-turbo wizard.
The original search was:
“"bridge" is not null”
*/
[out:json][timeout:250];
// fetch area Italia” to search in
  {{geocodeArea:Italia}}->.searchArea;
// gather results

(
  // query part for: “bridge=*”
  node["bridge"]({{bbox}})(area.searchArea);
  way["bridge"]({{bbox}})(area.searchArea);
  relation["bridge"]({{bbox}})(area.searchArea);
);
// print results
out body;
>;
out skel qt;

answered 02 Jan '23, 13:46

Fraccio's gravatar image

Fraccio
21112
accept rate: 0%

Source code available on GitHub .