Opened 10 years ago

Closed 6 years ago

#2360 closed enhancement (fixed)

osm2pgsql make planet_osm_ways contain all raw ways

Reported by: milo@… Owned by: jburgess777@…
Priority: minor Milestone:
Component: osm2pgsql Version:
Keywords: osm2pgsql Cc:

Description

I have been investigating osm2pgsql and discovered that not all xml way elements are parsed into the planet_osm_ways table.

As with planet_osm_nodes that does contain all the raw nodes, I would like planet_osm_ways to reflect the content of the osm-xml it originated from too, despite unknown tags and without ignoring the coastline.

Attachments (1)

output-pgsql.patch (3.0 KB) - added by milo@… 10 years ago.
TEST1: output-pgsql.patch, removing the polygon and coastline(filter) checks from pgsql_add_way

Download all attachments as: .zip

Change History (5)

comment:1 Changed 10 years ago by Tom Hughes

Owner: changed from Tom Hughes to jburgess777@…

comment:2 Changed 10 years ago by milo@…

Type: defectenhancement

I ran a first test. For the test I altered

static int pgsql_add_way(int id, int *nds, int nd_count, struct keyval *tags)

(see output-pgsql.patch)

to NOT test for polygon or filter. It partially does what I want, I now have coastlines and ways with "unknown" tags in my planet_osm_ways table.

I noticed one thing, the coastlines are now also being written to planet_osm_line, but natural is set to NULL instead of to coastline. I would prefer a method where the planet_osm_line ignores the coastlines and other unknown tags completely not parsing anything at all.

Changed 10 years ago by milo@…

Attachment: output-pgsql.patch added

TEST1: output-pgsql.patch, removing the polygon and coastline(filter) checks from pgsql_add_way

comment:3 Changed 8 years ago by Tom Hughes

Component: utilsosm2pgsql

comment:4 Changed 6 years ago by amm

Resolution: fixed
Status: newclosed

I haven't verified this, but briefly looking at the code, it seems all ways should be written to planet_osm_ways table. So I am closing this as out of date.

Note: See TracTickets for help on using tickets.