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

Change z_order of link roads #132

Closed
matthijsmelissen opened this issue Apr 9, 2014 · 6 comments
Closed

Change z_order of link roads #132

matthijsmelissen opened this issue Apr 9, 2014 · 6 comments
Assignees
Milestone

Comments

@matthijsmelissen
Copy link
Contributor

In the main openstreetmap-carto style and most styles derived from that, link roads are rendered below any other type of road. This is done so that the end of link roads do not overlap with the roads on which they end up.

It would therefore be logical to give link roads a lower z_order

Do you think this is something that can/should be handled by osm2pgsql?

See also the discussion here: gravitystorm/openstreetmap-carto#462

@matthijsmelissen
Copy link
Contributor Author

Is any of the osm2pgsql coders/maintainers able to help me with this issue?

@lonvia
Copy link
Collaborator

lonvia commented May 19, 2014

I believe that the openstreetmap-carto style still relies on tagtransform.c at the moment. Changing the z-order there is slightly problematic because we don't know how many other styles depend on the current order. So, I would suggest to move to the lua tagtransform at some point and have openstreetmap-carto supply its own style.lua. This way you can adapt the z-order exactly to the style as needed (and even introduce other tag preprocessing like normalization of booleans). However, you should be aware that lua support should still be considered beta. There might still be some smaller changes in the interface necessary and it might be a good idea to do some performance tests to compare with the c version of tagtransform. But that is nothing that should stop you from using it.

@pnorman
Copy link
Collaborator

pnorman commented May 19, 2014

performance tests to compare with the c version of tagtransform

Lua is ~10% slower on import, although as you start making it more complex it'll obviously slow down

@lonvia
Copy link
Collaborator

lonvia commented May 19, 2014

@pnorman thanks for those numbers.

I wonder how much of the penalty is due to the conversion of parameters from C to lua and back. Maybe there is room for improvement there.

@pnorman
Copy link
Collaborator

pnorman commented May 19, 2014

I wonder how much of the penalty is due to the conversion of parameters from C to lua and back. Maybe there is room for improvement there.

I should note that this was a few versions ago, and both the c and lua transforms have had some changes since then. The slowdown is also obviously going to depend on CPU bound vs disk bound.

@pnorman
Copy link
Collaborator

pnorman commented Feb 12, 2015

I think at this point there's enough experience with the proposed changes to consider them in osm2pgsql. Editing the original message to reflect what's desired

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