Skip to content

purusartha/gdal2tiles-leaflet

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker image for gdal2tiles-leaflet

What is gdal2tiles-leaflet?

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.

How to run as a docker 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.

Doccumentation from gdal2tiles-leaflet from Commenthol

See: https://github.com/commenthol/gdal2tiles-leaflet

Contribution and License Agreement

If you contribute code to this project, you are implicitly allowing your code to be distributed under the respective license. You are also implicitly verifying that all code is your original work or correctly attributed with the source of its origin and licence.

License

Modifications and samples are MIT licensed.

gdal2tiles.py: (MIT licensed)

  • Copyright (c) 2008, Klokan Petr Pridal
  • Copyright (c) 2010-2013, Even Rouault

References

About

Generate raster image tiles for use with leaflet.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 95.5%
  • JavaScript 4.0%
  • Other 0.5%