User:Ff5722/Using local tilesets as background layer
From OpenStreetMap Wiki
- Install an local web server such as WampServer or XAMPP
- Follow the instructions here to set up TileServer-php to be hosted on your local server (so, place the tileserver folder in the 'www' or 'htdocs' folder of Wamp or XAMPP).
- Redirect your localhost domain to a virtual domain.  (this is needed because JOSM doesn't accept background imagery hosted at localhost)
- Start the Apache server. Go to the tileserver page (http://localhost/tileserver). Verify that your virtual domain is working, by going directly to yourdomain.example/tileserver and not localhost/tileserver.
- Right click the WMTS link on the right side and copy the URL. In JOSM add this URL as a WMTS server (for example http://ff5722.local/tileserver/wmts).
- Open QGIS and go to Plugins > Manage and install plugins. In the Plugins window, go to Settings and enable 'Show also experimental plugins'. Click reload repository. From 'All' search for the 'QTiles' plugin by NextGIS and install it.
- Start the Apache server
- Open your GeoTIFF in QGIS (Layer > Add layer > Add raster layer).
- Go to Plugins > QTiles and open the QTiles window.
- I recommend only generating tiles up to zoom level 16 or less, otherwise it will take ages to generate and the resolution may not be good enough to make any use of high zoom levels. You can also speed it up by writing the generated tiles to your SSD instead of to a mechanical hard drive. Note: you can start tracing while the tiles are being generated, the processing starts from top left of the tile.
- Rename the JSON file to metadata.json and place it in the same folder as the tiles.
- In JOSM, select your custom WMTS server and start tracing