Skip to content

mpotanin/tilingtools

Repository files navigation

Command line tools for tiling georeferenced raster data

Table of Contents

Download Windows Binary

Download win-x64 binary 3.3.0 version (21.11.2019) ready for use package compiled with Microsoft Visual C++ 2019.

Using imagetiling

Parameters

  • -i - input raster file or file name template (obligatory parameter)
  • -ap - flag parameter which turns off mosaic mode - each input file is processed apart. By default: one layer of tiles is generated (mosaic mode)
  • -o - output file or folder. Default: output path is generated by adding some suffix to input path
  • -z - max zoom (base zoom). Default: max zoom is calculated from input raster file resolution and spatial reference system
  • -b - vector clip mask. Default: is not defined
  • -minz - min zoom. Default: 0 or 1
  • -tt - tile type: png, jpg, jp2, tif. Default: jpg
  • -r - resampling method tha is used to generate base zoom tiles (pyramid level tiles are generated from previous layer tiles by average resampling). Possible values: near, bilinear, cubic, lanczos. Default: cubic for general cases and near for rasters with index color table
  • -q - compression quality 1-100. Default: 85
  • -of - output tile container format: gmxtiles, mbtiles. Default: separate tiles
  • -co - creation options specific to output tile container format
  • -isrs - input files SRS in WKT or PROJ4 format. Default: SRS is defined from input files themselves
  • -tsrs - tiling spatial reference system. Possible values: 0 (World Mercator, EPSG:3395), 1 (Web Mercator or Spherical Mercatorv, EPSG:3857). Default value: 1
  • -tnt - output tile name templete. Default value: {z}/{x}/{y}
  • -nd - nodata value. Default: isn't defined
  • -ndt - nodata value tolerance. Default: isn't defined
  • -bgc - background color. Default: black color - 0,0,0
  • -bnd - raster band list order. Default: isn't defined
  • -wt - working threads number. Default: 2
  • -pseudo_png - code uint16 value into png red and green bands. Default: isn't defined

Examples

imagetiling -i image.tif -of mbtiles -o image.mbtiles -tt png
imagetiling -i image1.tif -i image2.tif -o image1-2_tiles -tt jpg -z 18 -minz 10
imagetiling -i images/\*.tif -of mbtiles -o images_tiles -tnt {z}_{x}_{y}.png
imagetiling -i image.tif -b clip.shp -nd 0 -of mbtiles -o image.mbtiles -tt png
imagetiling -i image.jpg -isrs "+proj=longlat +datum=wgs84"

Using CopyTiles

Parameters

  • -i - input folder or file
  • -o - output folder or file
  • -of - output tile container type
  • -b - vector clip mask: shp,tab,mif,kml,geojson
  • -tt - tile type: jpg,png
  • -z - min-max zoom, specifies zoom range of tiles to copy
  • -co - creation options specific to output tile container format
  • -tsrs - tiling spatial reference system. Possible values: 0 (World Mercator, EPSG:3395), 1 (Web Mercator or Spherical Mercatorv, EPSG:3857). Default value: 1
  • -i_tnt - input tile name template
  • -o_tnt - output tile name template

Examples

 copytiles -i tiles -i_tnt standard -tt png -of MBTiles -o tiles.mbtiles -z 10-15
 copytiles -i tiles -i_tnt {z}/{x}/{y}.png -of MBTiles -o tiles.mbtiles -b zone.shp
 copytiles -i tiles -i_tnt {z}/{x}/{y}.png -o tiles_new -o_tnt {z}_{x}_{y}.png 

Building from Source

Building on Windows

  • requirements:
    • x64 platform
    • Visual Studio 2019
  • git clone https://github.com/mpotanin/tilingtools tilingtools
  • git clone https://github.com/mpotanin/cpp_common_utils
  • download gdal330.zip archive. Unzip it into folder near tilingtools folder (on the same level)
  • open TilingTools.sln with Visual Studio 2019
  • compile TilingTools (set in Configuration Manager: configuration=Release, platform=x64)
  • if compilation succeed exe-files will be put into /x64/Release/

Building on Linux

  • requirements:
    • x64 platform
    • gcc 4.9.0 or newer version
    • development x64 version of the libraries: gdal, sqlite3 (if git is installed you may run: apt-get install git make libgdal-dev sqlite3 )
  • git clone https://github.com/mpotanin/tilingtools tilingtools
  • git clone https://github.com/mpotanin/cpp_common_utils
  • cd tilingtools
  • make

Update gdal version on Windows

  • download from https://www.gisinternals.com/
  • unpack into all into folders: gdalvvv/include, gdalvvv/x64/lib, gdalvvv/x64/bin
  • set version num - vvv - in consoleutils.cpp
  • compile list of all dlls from bin-folder and put it into "delay load" field in VS
  • compile list of all libs from lib-folder (exclude: libprotobuf, libprotobuf-lite, libprotoc) and put it into Linker input field in VS

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages