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

add linestring to osm streets within postgres

0

Here is what I did

I have imported streets from OSM into my postgres db with osmosis.

Here is my question

After importing the osm data with osmosis, I now wanna add a linestring to the osm streets. Is there a way to edit the linestring in the existing osm schema/structure that osmosis has defined within postgres

osm data structure within postgres via osmosis

Postgres is showing me following tables:

  • nodes
  • ways
  • way_nodes
  • relations
  • relation_members

can't figure out the relationship between the tables. I now that the table 'ways' is connected with the table 'way__nodes' via the way_id column.

asked 10 Nov '19, 20:31

Tara's gravatar image

Tara
21224
accept rate: 0%

edited 10 Nov '19, 20:32

I suspect you may be better with an osm2pgsql database rather than an API or snapshot DB (from your comment this looks like a snapshot DB). Depending which osmosis options you used there may well be a column containing line strings in the ways table. Otherwise you need to write (quite) complex queries linking nodes, way_nodes and ways.

(11 Nov '19, 11:28) SK53 ♦

Source code available on GitHub .