[Tile-serving] [openstreetmap/osm2pgsql] Update options.cpp (#893)

Jochen Topf notifications at github.com
Thu Jan 10 16:16:58 UTC 2019


When lonvia mentioned "-1" as the invalid coordinate what she meant was the largest positive int 32 value. That can never be a valid coordinate, -1 is valid of course.

The real solution here is not to fiddle around with the invalid value, but to find a different encoding of the flat node file for small datasets. Something like the `FlexMem` index in libosmium, but one that also works on disk. This would be totally doable, it just needs some careful work defining such a format and make sure it re-sizes to the other format when the dataset grows too much.

The reason for this is the following: If we change the current format somehow to use the zero byte for the invalid value, we could potentially recover disk space for blocks that are completely empty. But if you have a sizable number of completely empty blocks (and only then this would matter), chances are you have lots of block containing just one location, or two, or three. For them the optimization would not work, so you still use 4k or so for a single or a few locations. So in this case a different format would be much better, even if it would use, say, 10 bytes per location it would still be two orders of magnitude better.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/893#issuecomment-453155028
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20190110/4e1d07d1/attachment.html>


More information about the Tile-serving mailing list