Friday, May 15, 2015

Tiler tools, an alternative scripts to for creating raster tiles from digital maps

Other day I was working to generate the Google Map based raster tiles using Gdal2tiles for a large raster file, 30GB in size. Gdal2tiels complains about the following error, which I had no clue.

Then fiddling with others tilers available I played with the Tilers-tools, python Scripts for raster tile sets from digital maps with GDAL dependency. After spending few days hit and trial, finally I am able to generate raster tiles compatible with Google Maps. Here I am sharing the steps that I follow to produce tiles using the Tiler tool. Hope it will help some of the OSGeo users. I have divided tile generation steps into two groups, dependency installation and data preparation with a presumption that you are already familiar with GDAL.


STEP 1. Install Python geospatial packages

Install the dependencies as described-

For my project, I used 32 bit installers and Python 2.7. Strictly follow the python Geospatial package dependency installation orders and do not mix the 64 bit and 32 bit dependencies

STEP 2. Install the Tiler tools

Download and unzip the Tiler tool from:

STEP 3. Set Python and Gdal path in Tiler’s bat file

Open : tilers-tools.bat from unzipped Tiler tool
         set PYTHON=C:\Python27 ( As you assigned the path in Step 1)
         set GDAL=C:\Program Files (x86)\GDAL ( As you assigned the path in Step 1)

STEP 4. Environmental variable setting on your machine

Set GDAL_DATA & path in your environmental variable setting.

                   Variable          Value

       GDAL_DATA = C:\Program Files (x86)\GDAL\gdal-data

        path = C:\Program Files (x86)\GDAL


STEP 1. Build vrt out of your large dataset using gdalbuildvrt

   gdalbuildvrt -srcnodata 0  -vrtnodata 0  myImage.vrt  LargeImage.img

STEP 2: Assign projection to vrt using gdalwarp

 gdalwarp -of VRT  -t_srs "EPSG:4326" -co "TILED=YES" myImage.vrt  newMyImage.vrt

STEP 3. Launch the Tiler tool

Double click Tiler’s bat file to launch the tiler tool and run the following command. -r -z 1:11 --srs "EPSG:4326"  --tiles-srs "EPSG:4326" -p xyz newMyImage.vrt

Download as doc:

GDAL , Python


Post a Comment


© 2011 GIS and Remote Sensing Tools, Tips and more .. ToS | Privacy Policy | Sitemap

About Me