Why not ask your question on the new OpenStreetMap Community Forum?

I'm trying to import xml data from an overpass query into postgres. Using the latest windows build on appveyor, "osm2pgsql -c -d postgis_25_sample -U postgres -H localhost -P 5432 -S default.style "myData.osm" -W -s" completes successfully. While it builds the osm_nodes, osm_point, and osm_ways tables correctly, the osm_line table is empty.

The data looks something like this: https://paste.ee/p/iUUdg Is something wrong with the data or is it something else?

asked 15 Jun '19, 02:48

shinyburger's gravatar image

shinyburger
16113
accept rate: 0%

edited 15 Jun '19, 02:59

Does your data actually contain anything that would be imported in to osm_line? For example non-closed ways that are not part of a MP?

(15 Jun '19, 11:26) SimonPoole ♦

Yes. I'm sure. The polygon table is empty as well.

(17 Jun '19, 02:06) shinyburger

Your data is not NWR (Nodes, Ways, Relations) ordered, I don't believe you will get any kind of consistent results without doing that (I'm actually surprised that it imports at all).

PS: I discussed this with the osm2pgsql maintainers, and to be exact: osm2pgsql doesn't require overall nwr ordering, but it does require nodes referenced by ways to be before the ways that reference them (in practical terms this naturally doesn't really make a difference).

permanent link

answered 18 Jun '19, 14:17

SimonPoole's gravatar image

SimonPoole ♦
44.6k13324700
accept rate: 18%

edited 19 Jun '19, 08:48

Your answer
toggle preview

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:

×261

question asked: 15 Jun '19, 02:48

question was seen: 1,010 times

last updated: 19 Jun '19, 08:48

powered by OSQA