08 – How to generating tiles

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:

  • 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, send them to Situm so we can upload them to our cloud and you can view them.

Subscribe to our newsletter

BASIC INFORMATION ON DATA PROTECTION

Data controller: SITUM TECHNOLOGIES, S.L.
Contact: Data controller: situm@situm.es
Responsible for protection: dpo@situm.es
Purpose and legal basis: To manage the sending of SITUM newsletters only with consent.
Legitimation: Express consent of the interested party.
Recipients: The data will not be passed on to third parties with the exception of legal obligations.
Retention period: As long as the interested party remains subscribed to the newsletter (a link to unsubscribe will be available in each newsletter sent by Situm).
Rights: The interested party may at any time revoke their consent, as well as exercise their rights of opposition, access, conservation, rectification, limitation, deletion of data and not be subject to a decision based only on automated data processing, by writing to SITUM at the addresses indicated.
Additional Information: You can consult additional and detailed information on Data Protection in our privacy policy.

Please, download your copy here

Thank you for downloading our whitepaper. Please do not hesitate to contact us if you would like to know more about how our solutions can help your business. Download whitepaper


Close window