openstreetmap / openstreetmap/mod_tile
UTFGrid support for mod_tile
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 318
- Forks
- 199
- PR merge metrics
- No merged PRs in 30d
Description
Trying to get mod_tile producing UTF8Grids. Wondering if anyone else has looked at this. Apparently the fix would be in mapnik itself. Some notes on this from @springmeyer below.
The reason renderd does not support tile end points for interactivity/grids is that Mapnik support is partially in C++ and partially in the bindings (python or JavaScript). It ended up this way because to leverage the json support in each of those languages and not implement the full json encoding for utf8grids in C++. But in doing so, renderd needs to implement that json encoding on its own, which has not happened yet and likely shouldn't since ideally Mapnik would just do this in C++ to save the duplicative work.
The grid_renderer builds up an image like array of feature ids. Then that needs to be turned into json. The code to do it is is already in c++ actually but writes to a c++ boost python object. Instead it would need to write to a string that could be parseable as json. The bindings code is mapnik/bindings/python/python_grid_utils.hpp. We don't actually need a json encoder and the intermediate objects it would likely require.
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 reading the issue notes about renderd, Mapnik's grid_renderer, and mapnik/bindings/python/python_grid_utils.hpp. Trace how feature IDs are built and how the existing C++ code writes them to a Boost.Python object. Done means mod_tile can produce UTF8Grids without duplicating JSON encoding in renderd.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100