HN2new | past | comments | ask | show | jobs | submitlogin

I do a cycle map with my own style and these are my steps and tools:

1) Download a region from geofabrik. 2) Extract, transform and load the data into pgsql with osm2pgsql. I use the osm2pgsql flex mode. QGis can load osm extracts direcly, but the resulting layers have many errors in the details and using pgsql is much faster while viewing and rendering. Imposm is also a good alternative to osmpgsql. 3) Use QGis for styling the map. 4) Generate static tiles with https://docs.qgis.org/3.10/en/docs/user_manual/processing_al... (With DPI 250 and a tilesize of 512x512 for use on high resolution screens.) 5) Upload the tiles to my own server. 6) Load the tiles in OSMAnd as a custom map.

Qgis has a build in tile server https://www.qgis.org/de/site/about/features.html#qgis-server and leaflet can load the tiles via https://leafletjs.com/reference-1.6.0.html#tilelayer-wms . But this does not work for OSMAnd.

QGis can also create beautiful print maps with the "Atlas" feature.



Can I use spatialite coupled with QGIS to generate those tiles? How well does it perform?


On my system spatialite is 10% the speed with the Germany extract compared to PostgreSQL. Bigger extracts don't work properly.

But loading data directly from a osm.pbf or loading data via the QGis QuickOSM plugin into a spatialite file gives two problems:

1) You can not transform the data to fit your personal usage. Raw osm data is not nice to work with.

2) I had many problems with areas stored as relations (example: islands in lakes) and relation handling overall is a mess.

For the first steps and to toy around osm data in spatialite works. But don't fear osm2pgsql. For standard use cases it's a oneliner.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: