All Projects → commenthol → Gdal2tiles Leaflet

commenthol / Gdal2tiles Leaflet

Licence: mit
Generate raster image tiles for use with leaflet.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Gdal2tiles Leaflet

georaster-layer-for-leaflet
Display GeoTIFFs and soon other types of raster on your Leaflet Map
Stars: ✭ 168 (-50.3%)
Mutual labels:  leaflet, raster
Leaflet.canvaslayer.field
Load and style Raster files in Leaflet (geotiff & asciigrid)
Stars: ✭ 128 (-62.13%)
Mutual labels:  raster, leaflet
geoblaze
Blazing Fast JavaScript Raster Processing Engine
Stars: ✭ 80 (-76.33%)
Mutual labels:  raster
Leaflet Ant Path
🌿🐜 Creates a leaflet polyline with a 'ant-path' animated flux
Stars: ✭ 296 (-12.43%)
Mutual labels:  leaflet
leaflet-rs
A wasm-bindgen wrapper for Leaflet.js
Stars: ✭ 19 (-94.38%)
Mutual labels:  leaflet
django-leaflet-admin-list
The Django Leaflet Admin List package provides an admin list view featured by the map and bounding box filter for the geo-based data of the GeoDjango.
Stars: ✭ 28 (-91.72%)
Mutual labels:  leaflet
Leaflet.pixioverlay
Bring Pixi.js power to Leaflet maps
Stars: ✭ 264 (-21.89%)
Mutual labels:  leaflet
dash leaflet
Leaflet component for dash. Illustration of error encountered during python build.
Stars: ✭ 21 (-93.79%)
Mutual labels:  leaflet
Ui Leaflet
AngularJS directive to embed an interact with maps managed by Leaflet library
Stars: ✭ 315 (-6.8%)
Mutual labels:  leaflet
geowombat
GeoWombat: Utilities for geospatial data
Stars: ✭ 34 (-89.94%)
Mutual labels:  raster
Leaflet.timeline
Display arbitrary GeoJSON on a map with a timeline slider and play button
Stars: ✭ 291 (-13.91%)
Mutual labels:  leaflet
spDataLarge
R package with large datasets for spatial analysis
Stars: ✭ 19 (-94.38%)
Mutual labels:  raster
gwty-leaflet
A GWT JsInterop wrapper for Leaflet.
Stars: ✭ 29 (-91.42%)
Mutual labels:  leaflet
Grass
GRASS GIS - free and open source Geographic Information System (GIS)
Stars: ✭ 281 (-16.86%)
Mutual labels:  raster
gatsby-starter-leaflet
🍃 A Gatsby starter with Leafet to quickly build React apps with a map!
Stars: ✭ 108 (-68.05%)
Mutual labels:  leaflet
Leaflet.markercluster
Marker Clustering plugin for Leaflet
Stars: ✭ 3,305 (+877.81%)
Mutual labels:  leaflet
Leaflet.MarkerCluster.List
a subplugin for the Leaflet.MarkerCluster to display clustered child elements in the list
Stars: ✭ 14 (-95.86%)
Mutual labels:  leaflet
is-osm-uptodate
Find outdated nodes in OpenStreetMap
Stars: ✭ 16 (-95.27%)
Mutual labels:  leaflet
XArrayAndRasterio
Experimental code for loading/saving XArray DataArrays to Geographic Rasters using rasterio
Stars: ✭ 21 (-93.79%)
Mutual labels:  raster
Leaflet.timedimension
Add time dimension capabilities on a Leaflet map.
Stars: ✭ 329 (-2.66%)
Mutual labels:  leaflet

gdal2tiles-leaflet

Generate raster image tiles for use with leaflet.

Example in action.

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.

Prerequisites

On Debian style OS:

sudo apt install python-gdal

for python3

sudo apt install python3-gdal

for others give your search-engine a try...

Basic usage

$ gdal2tiles.py -l -p raster -z 0-5 -w none <image> <tilesdir>

Check test/createtiles.sh for usage.

If the -z option is omitted then the tool considers the min. zoom level otherwise note...

Note: The min zoom level for tile generation must be greater or equal to log2(max(width, height)/tilesize)

Assuming an image with 2000x3000 pixels:

# take the larger dimension -> here height = 3000px
$ echo "l(3000/256)/l(2)" | bc -l
# 3.55 --> min zoomlevel for tile generation is 4
# means: `gdal2tiles.py -l -p raster -z 0-2 ...`
#                                          \__ is not allowed
# correct usage
$ gdal2tiles -l -p raster -z 0-4 ...

Multicore usage

The same works with multicore support, thanks to gdal2tiles-Ticket-4379.

$ gdal2tiles-multiprocess.py -l -p raster -z 0-5 -w none <image> <tilesdir>

Usage with Leaflet

To use the generated tiles with Leaflet there is a small plugin to correctly set the required projection for raster images. Please refer to the documention at leaflet-rastercoords.

Example

To run the example you'll need to generate the tiles for the large image first.

$ cd test
$ ./createtiles.sh
$ open index.html

Then open index.html in a browser.

The sample in test

Or see it here in action.

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].