1

I am about to start making 50+ maps for my next book project. The last 2 books were a struggle with the huge amount of Ontario, Canada vector data to make my basemaps.

These were large files from the Ontario Gov. and OpenStreetMaps. I spent time clipping and cropping the data into smaller areas but it still was overwhelming for QGIS and would crash too often.

So as I start into this book project again I am sure you smart folks here know a better/faster workflow.

I was thinking of creating a local vector tile database to serve only the canvas extent as the solution. If yes how?

I have been working with QGIS for 6 years but only know enough to make my bike trail maps. I'm not a code/db wizkid.

(BTW - my book has no map budget so using paid services is a non-starter.)


A few days later...

Here is what works for me & vector maps display really fast!

I installed Postgres as a local server database. Then I imported the OpenStreetMap .pbf data into it. In QGIS I connected with my PostgreSQL DB. That's the basics.

Here are a few links to sort out a rather complicated setup made easier with a Win10 Installer. Also working from within QGIS to add content to the DB appears to be less of a coding headache than adding through pgAdmin4.

I also have connected to an ArcGIS REST Server with the Ontario Gov. to pull in DEM maps.

It is still early to say all is ideal and I have yet to get to styling the map data. But I am excited that this may take a month less to do all my trail maps now.

These links will get you started-

Basics of PostgreSQL/OSM https://youtu.be/QJF4jLRBFrU

4 part video I used to set up my server - https://youtu.be/decUXZZlstA

Dan R
  • 143
  • 1
  • 11
  • 3
    a spatial database like postgis (no cost apart from hardware to run it). see https://postgis.net/docs/ST_AsMVT.html a Mapbox Vector Tile representation – Mapperz Mar 31 '23 at 17:40
  • 4
    Go with a database, even if you run it on your own computer, with spatial indexes on each layer/table – JGH Mar 31 '23 at 18:37
  • I would convert your OSM and LIO data to geopackage layers, preferably in the same projection, check/fix the geometry of each, create spatial indexes for all the layers and avoid long path names. Both OSM and LIO road and streams data contain a lot of roads/streams that aren't necessary for a lot of purposes so you could perhaps use filters/selections by expressions and even manual selections to get rid of them. – John Mar 31 '23 at 20:59
  • Depending on the scale of your maps the remaining streams and roads might be "simplifield" via GRASS v.generalize or the QGIS or SAGA simplify tools. If you are using complex rule based symbology or labeling you might instead add fields specifically for symbology or labels to avoid processing the rules. Symbology and label complexity might be looked at to see what is really needed. – John Mar 31 '23 at 20:59
  • Thanks for your input guys. So a local DB seems to be the answer. Can I get a few more clues... as I have looked around and still seemed lost as to how to set this up? A few more links would do me well. – Dan R Apr 01 '23 at 15:06
  • 1
    on windows the stackbuilder is a quick way to get postgis up and runner on a pc https://gis.stackexchange.com/questions/41060/installing-postgis-on-windows – Mapperz Apr 01 '23 at 22:40

0 Answers0