Locally serve geospatial raster tiles in the Slippy Map standard.
Project description
🚀 Support This Project
If localtileserver saves you time, powers your work, or you need direct help, please consider supporting the project and my efforts:
🌐 Local Tile Server for Geospatial Rasters
Need to visualize a rather large (gigabytes+) raster? This is for you.
A Python package for serving tiles from large raster files in
the Slippy Maps standard
(i.e., /zoom/x/y.png) for visualization in Jupyter with ipyleaflet or folium.
Launch a demo on MyBinder
Documentation: https://localtileserver.banesullivan.com/
Built on rio-tiler
🌟 Highlights
- Launch a tile server for large geospatial images
- View local or remote* raster files with
ipyleafletorfoliumin Jupyter - View rasters with CesiumJS with the built-in web application
*remote raster files should be pre-tiled Cloud Optimized GeoTiffs
🚀 Usage
Usage details and examples can be found in the documentation: https://localtileserver.banesullivan.com/
The following is a minimal example to visualize a local raster file with
ipyleaflet:
from localtileserver import get_leaflet_tile_layer, TileClient
from ipyleaflet import Map
# First, create a tile server from local raster file
client = TileClient('path/to/geo.tif')
# Create ipyleaflet tile layer from that server
t = get_leaflet_tile_layer(client)
m = Map(center=client.center(), zoom=client.default_zoom)
m.add(t)
m
ℹ️ Overview
The TileClient class can be used to to launch a tile server in a background
thread which will serve raster imagery to a viewer (usually ipyleaflet or
folium in Jupyter notebooks).
This tile server can efficiently deliver varying resolutions of your raster imagery to your viewer; it helps to have pre-tiled, Cloud Optimized GeoTIFFs (COGs).
There is an included, standalone web viewer leveraging CesiumJS.
⬇️ Installation
Get started with localtileserver to view rasters in Jupyter or deploy as your
own Flask application.
🐍 Installing with conda
Conda makes managing localtileserver's dependencies across platforms quite
easy and this is the recommended method to install:
conda install -c conda-forge localtileserver
🎡 Installing with pip
If you prefer pip, then you can install from PyPI: https://pypi.org/project/localtileserver/
pip install localtileserver
💭 Feedback
Please share your thoughts and questions on the Discussions board. If you would like to report any bugs or make feature requests, please open an issue.
If filing a bug report, please share a scooby Report:
import localtileserver
print(localtileserver.Report())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file localtileserver-0.10.7.tar.gz.
File metadata
- Download URL: localtileserver-0.10.7.tar.gz
- Upload date:
- Size: 33.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8b76565c9f9e909e99a0a88f91b370aae15d810e26bc0b864710aff2924103b
|
|
| MD5 |
a48ff0b61d76883c2c4792492c9e97f7
|
|
| BLAKE2b-256 |
6c4124be632c2a7ff815023e5c426d5c18f8c6d0a1f247842d453a81a3f90d21
|
File details
Details for the file localtileserver-0.10.7-py3-none-any.whl.
File metadata
- Download URL: localtileserver-0.10.7-py3-none-any.whl
- Upload date:
- Size: 33.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a1c1be6baeb04bef93b9a4b8a66ca57e469b39ba14f1a1f32147a9b8da387f2
|
|
| MD5 |
ec36c6f1bb5a76ccc638b017d24b852e
|
|
| BLAKE2b-256 |
45b79f5f80927707fd4d1fb2d5fc9def9b2934223ffaf4d587d3921e04f09943
|