-
-
Notifications
You must be signed in to change notification settings - Fork 475
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
Re-do Lua API #901
Comments
The second bullet point was the main feature I was hoping for! If anything else springs to mind I'll post back. |
We should let the lua transforms set the distance for line splitting on a per-object area, as well as set if MULTIPOLYGONs are broken up |
In an ideal world I'd like filter_tags_way to have some very limited access to the way geometry (even if just the first node), for national rendering variations. Currently I cope with this by pre-/post-processing. This may or not be at all possible! |
If it is possible - and I'm not sure on that - bounding box is probably the sensible arg to pass |
It's possible, we have the information but it would make the processing more expensive. Currently we only retrieve geometries for ways that have not been filtered. If filtering needs the geometries then we need to retrieve it for all ways. So my favourite solution would be a callback function for Lua that can retrieve the geometry when needed. (e.g. in the particular case only for ways that are rendered in a country-specific style.). |
+1 - that's something I do in both tilemaker and my OSRM fork and it works very effectively. |
This might be a new use case for the Lua API: https://twitter.com/realgiggls/status/1138066068117884929 |
Implemented in new 'flex' output. |
Now that we have experience with the Lua API, the multi-backend, and have new feature requests which require API changes, we should redo the API.
To allow a transform to be compatible with current API we can use different function names, and then a transform can implement both entry points reasonably easily.
The current API is
Experience has shown num_tags is not needed because we're not in C.
next(tags) == nil
does the same check, is more idiomatic Lua, and is faster.With old-style MP support gone, we don't need the superseded tests.
New features desired are
What other changes do we want to make?
cc @kevinkreiser @systemed
The text was updated successfully, but these errors were encountered: