Generate raster image tiles for use with leaflet. From commenthol
880
gdal2tiles-leaflet is developed by Commenthol See https://github.com/commenthol/gdal2tiles-leaflet
It generates raster image tiles from a given image for the use with leaflet.
This is a modified version of gdal2tiles.py which adds support for raster images as plain 2D maps in leafletjs. It adds the option -l or --leaflet to generate the resulting images with the reference point [0,0] in the upper-left (North-West) corner, opposed to the standard behaviour for TMS tiles using the lower-left (South-East) corner.
Together with the small leafletjs plugin leaflet-rastercoords you'll be able to add markers at the correct position using the (x, y) coordinates of the full-size image.
This docker installs gdal2tiles-leaflet in a docker container so you can use docker to run the gdal2tiles-leaflet command.
To run the docker gdal2tiles-leaflet command, run this command in the folder with your image. It links the current working directory to a folder called data in the docker container. Then run:
docker run --rm -v `pwd`:/data niene/gdal2tiles-leaflet -l -p raster -z 0-5 -w none /data/<image> /data/<tilesdir>
The --rm flag removes the docker container and its volume after it is finished executing.
Content type
Image
Digest
Size
499.3 MB
Last updated
almost 9 years ago
docker pull niene/gdal2tiles-leaflet