Spatialite and Mapnik

50 views
Skip to first unread message

rinigus

unread,
Apr 18, 2017, 3:18:01 AM4/18/17
to spatiali...@googlegroups.com
Hi,

I am working on incorporating Mapnik as a rendering backend for an offline maps server. The server is mainly used in Sailfish (Linux distribution for mobile phones) and can be used in Linux as well.

For those interested in using Mapnik together with SQLite/Spatialite, I have adopted OSM Bright style and wrote import scripts to convert PBFs to Spatialite databases at https://github.com/rinigus/osm-bright-sqlite . Its a work in progress, but can be used already. Full planet, when chopped into countries, as in Geofabrik (with small adjustments like skipping continents) takes about 110 GB harddisk space in BZ2 compressed form (compression factor about 1/2, checked on Germany). Performance is not too bad and I can, with some patience, use it on mobile as well.

I am planning to work on optimizing storage and performance. I plan to look into how to reduce Geometry blob footprint (point to WKB, others to compressed versions, probably) and on performance.

Regarding performance, I wonder if there is a tool/script around that would go through the long linestrings and chop them into smaller pieces? Or maybe someone knows how to do that in SQL? Like

IF LINESTRING LENGTH > 1000 POINTS, SPLIT IT INTO 2 AND STORE AS TWO OBJECTS

Best wishes,

Rinigus
Reply all
Reply to author
Forward
0 new messages