Introduction #
In the following documentation we will explain how tiles are generated as well as the resources needed to generate them. For this we would need:
- Coordinates of the corners of the Dashboard floors, they are obtained here.
- Image file with our plants in high resolution.
- QGIS program installed.
- Windows computer with Ubuntu console or computer with Linux.
QGIS Process #
The process would be the process for generating Tiles:
- Download QGIS from the following link: https://www.qgis.org/en/site/forusers/download.html
- Go to Raster or Layer (depending on the version) -> Georeferencer in the top menu (it may be under Layer).
- Then go to Open Raster and load the high-definition map.
- Click on Select Point and enter the 4 corners of the Dashboard.
- To adjust these points correctly, you need to edit the table following this criterion:
- Top-left point -> X origin = 0 // Y origin = 0
- Top-right point -> X origin = width of the loaded image // Y origin = 0
- Bottom-right point -> X origin = width of the loaded image // Y origin = negative height of the loaded image
- Bottom-left point -> X origin = 0 // Y origin = negative height of the loaded image
- Go to Transformation Settings and set the following transformation:
- Save the points.
- Click on Start Georeferencing.
- Look for “Generate XYZ tiles” in the processing toolbox, fill in the following parameters and execute:
- Once generated, compress them using OptiPNG, for which you will need to have the Ubuntu console installed on Windows or do it on Linux.
Installation of Ubuntu console on Windows #
Install OptiPNG #
To install it, simply run these commands in the Ubuntu console:
sudo apt-get update
sudo apt-get install optipng
Once installed, use the following commands to navigate to the directory where the Tiles are saved:
cd .. → Takes you to the previous directory
cd directoryname → Takes you to the specified directory (if it's a subfolder)
ls → List of subfolders in the current directory
Compress images #
Once you reach the root of the zoom folder you want to compress, execute the following command (remember to run the Ubuntu console as an admin):
sudo optipng **/*.png
Once compressed, you can upload them to Situm.
Uploading tiles #
In order to upload the tiles, you need package them in a zip file. This zip must one folder per floor to which you want to associate the tiles. Each folder must be named using the ID of each of those floors:
Inside each folder, you will find the typical “zoom/x/y” structure of tile servers:
Then, you may upload them to Situm Dashboard in the Building edition dialog: