Uh oh!
There was an error while loading. Please reload this page.
Add support for encoding data as a raw image bitmap to UTF grids - #43
Add support for encoding data as a raw image bitmap to UTF grids#43mcuelenaere wants to merge 1 commit into
Conversation
This adds support for getting the raw image data rendered by the mapnik grid renderer. The data is returned as 64-bit signed integers or 32-bit signed integers (host endian), depending on whether BIGINT is true or not.
flippmoke
commented
Jul 30, 2015
I am somewhat confused by this, why not just use the Image object to get raw image data |
mcuelenaere
commented
Jul 30, 2015
@flippmoke How would you access the Image object? AFAICS, there's no way to access the underlying buffer from a |
flippmoke
commented
Jul 30, 2015
My question is more why are you using a grid object rather then an Image object. https://github.com/mapnik/python-mapnik/blob/master/src/mapnik_image.cpp#L454-L456
|
flippmoke
commented
Jul 30, 2015
Also if you did want the raw character buffer from the grid does that really help because you wouldn't have a mapping to what the character were? |
mcuelenaere
commented
Jul 31, 2015
@flippmoke I experimented with UTF grid, but found its resolution to be too low for our use case and increasing the resolution inflates the JSON too much. So by getting the raw grid data (which is basically an array of 64-bits containing the feature IDs (which can be downscaled to 32-bit, 16-bit or 8-bit; depending on the amount of features)), we want to send these as images down to the client and extract the data to get the corresponding feature ID in JavaScript. A mapping to the actual feature metadata will be provided out of band, eg with a static JSON file. |
flippmoke
commented
Jul 31, 2015
Okay that makes more sense. So some things I want to talk about before we would be able to merge something to help you out.
If you need any help towards achieving these things let me know please, more then willing to give input or help. Thanks for your pull request! |
mcuelenaere
commented
Jul 31, 2015
Sure, what API are you suggesting? I'm off the coming week so I probably won't be responsive. |
flippmoke
commented
Jul 31, 2015
That would be fine, do we need to have a way to retrieve what the raw symbols mean then at this point, etc. If they are not included in the |
mcuelenaere
commented
Jul 31, 2015
Aren't the raw symbols the feature IDs? Unless you want to keep that an implementation-specific thing and allow for changing the meaning in the future? (in which case you do need a mapping) |
This adds support for getting the raw image data rendered by the
mapnik grid renderer. The data is returned as 64-bit signed integers or
32-bit signed integers (host endian), depending on whether BIGINT
is true or not.