openstreetmap / openstreetmap/mod_tile
Map parameterization should be reverted
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 318
- Forks
- 199
- PR merge metrics
- No merged PRs in 30d
Description
/cc @jburgess777
Looking into ttps://github.com/mapnik/mapnik/issues/2965, I wondered if renderd was doing anything unsafe.
I noticed that https://github.com/openstreetmap/mod_tile/commit/c4aabc570103e72876e9889a20396e719f52bca4 added mutation of map objects per render. While this might work I think it should be reverted for at least these reasons:
- A copy of the
mapnik.Mapis made every time a tile is rendered even if noparameterize_functionis set. This is potentially very expensive. - I think parameterization would be much better done in XML before loading the map. Ideally maps should not be modified after being loaded.
- If per render changes to styling truly need to be made, then a much better design would be to leverage Mapnik 3.x variables: https://github.com/mapnik/mapnik/issues/2553
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing commit c4aabc570103e72876e9889a20396e719f52bca4 and the renderd path that applies parameterize_function to map objects. Compare that behavior with the concerns in Mapnik issues 2965 and 2553. Done means the per-render map mutation is reverted or replaced by an agreed design, with no unnecessary map copy when parameterization is unused.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100