Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't split route lines at import #677

Closed
marcosfede opened this issue Jan 23, 2017 · 3 comments
Closed

don't split route lines at import #677

marcosfede opened this issue Jan 23, 2017 · 3 comments

Comments

@marcosfede
Copy link

Hello, I downloaded the osm data for my region and I want to make spatial querys (for example, does this route intersect with these two points/areas? ) for bus routes.
I can see that the bus routes are being split into several chunks, specially when the bus makes a circle (there are lots of circular parks in my area).

the way I'm importing the data is

osm2pgsql -E 3857 --cache-strategy sparse --slim -d mydb -H localhost -U myuser -P 5432 --hstore --hstore-add-index file.osm

I have also tried using the -G parameter, but the routes keeps splitting up into chunks.

How would I import the data without splitting the bus routes?
Thanks in advance

@pnorman
Copy link
Collaborator

pnorman commented Jan 23, 2017

type=route relations cannot always form a contiguous linestring, so may end up producing multiple rows. Even where they can form a single linestring, they can be split for length.

I have also tried using the -G parameter, but the routes keeps splitting up into chunks.

Yes, -G is for multipolygons only.

@marcosfede
Copy link
Author

Is there a way I can consolidate the rows to get a single linestring?
the problems seems that when the route enters a rondabout the line splits, example:
http://www.openstreetmap.org/relation/5419031
has http://www.openstreetmap.org/way/23187155 in it , and the route is being split at that point.

@lonvia
Copy link
Collaborator

lonvia commented Feb 7, 2020

The new 'flex' output allows to customize the splitting of route relation lines (including creating one big multiline).

@lonvia lonvia closed this as completed Feb 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants