NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the 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.7k13326701
accept rate: 18%

edited 19 Jun '19, 08:48

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:

×263

question asked: 15 Jun '19, 02:48

question was seen: 1,156 times

last updated: 19 Jun '19, 08:48

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