![tile-diagram](https://raw.githubusercontent.com/banesullivan/localtileserver/main/imgs/oam-tiles.jpg)
# đ Local Tile Server for Geospatial Rasters
[![codecov](https://codecov.io/gh/banesullivan/localtileserver/branch/main/graph/badge.svg?token=S0HQ64FW8G)](https://codecov.io/gh/banesullivan/localtileserver)
[![PyPI](https://img.shields.io/pypi/v/localtileserver.svg?logo=python&logoColor=white)](https://pypi.org/project/localtileserver/)
[![conda](https://img.shields.io/conda/vn/conda-forge/localtileserver.svg?logo=conda-forge&logoColor=white)](https://anaconda.org/conda-forge/localtileserver)
*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](https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames)
(i.e., `/zoom/x/y.png`) for visualization in Jupyter with `ipyleaflet` or `folium`.
Launch a [demo](https://github.com/banesullivan/localtileserver-demo) on MyBinder [![MyBinder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/banesullivan/localtileserver-demo/HEAD)
Documentation: https://localtileserver.banesullivan.com/
Built on [rio-tiler](https://github.com/cogeotiff/rio-tiler)
## đ Highlights
- Launch a tile server for large geospatial images
- View local or remote* raster files with `ipyleaflet` or `folium` in 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`:
```py
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
```
![ipyleaflet](https://raw.githubusercontent.com/banesullivan/localtileserver/main/imgs/ipyleaflet.png)
## âšī¸ 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)](https://www.cogeo.org/).
There is an included, standalone web viewer leveraging
[CesiumJS](https://cesium.com/platform/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:
```bash
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](https://github.com/banesullivan/localtileserver/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`:
```py
import localtileserver
print(localtileserver.Report())
```
Raw data
{
"_id": null,
"home_page": null,
"name": "localtileserver",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": "Bane Sullivan <hello@banesullivan.com>",
"download_url": "https://files.pythonhosted.org/packages/d1/f3/f6b00453f56f456795d357c4978708b2d24d1c46e51e8707c2cbe1ec54cd/localtileserver-0.10.3.tar.gz",
"platform": null,
"description": "![tile-diagram](https://raw.githubusercontent.com/banesullivan/localtileserver/main/imgs/oam-tiles.jpg)\n\n# \ud83c\udf10 Local Tile Server for Geospatial Rasters\n\n[![codecov](https://codecov.io/gh/banesullivan/localtileserver/branch/main/graph/badge.svg?token=S0HQ64FW8G)](https://codecov.io/gh/banesullivan/localtileserver)\n[![PyPI](https://img.shields.io/pypi/v/localtileserver.svg?logo=python&logoColor=white)](https://pypi.org/project/localtileserver/)\n[![conda](https://img.shields.io/conda/vn/conda-forge/localtileserver.svg?logo=conda-forge&logoColor=white)](https://anaconda.org/conda-forge/localtileserver)\n\n*Need to visualize a rather large (gigabytes+) raster?* **This is for you.**\n\nA Python package for serving tiles from large raster files in\nthe [Slippy Maps standard](https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames)\n(i.e., `/zoom/x/y.png`) for visualization in Jupyter with `ipyleaflet` or `folium`.\n\nLaunch a [demo](https://github.com/banesullivan/localtileserver-demo) on MyBinder [![MyBinder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/banesullivan/localtileserver-demo/HEAD)\n\nDocumentation: https://localtileserver.banesullivan.com/\n\nBuilt on [rio-tiler](https://github.com/cogeotiff/rio-tiler)\n\n\n## \ud83c\udf1f Highlights\n\n- Launch a tile server for large geospatial images\n- View local or remote* raster files with `ipyleaflet` or `folium` in Jupyter\n- View rasters with CesiumJS with the built-in web application\n\n**remote raster files should be pre-tiled Cloud Optimized GeoTiffs*\n\n## \ud83d\ude80 Usage\n\nUsage details and examples can be found in the documentation: https://localtileserver.banesullivan.com/\n\nThe following is a minimal example to visualize a local raster file with\n`ipyleaflet`:\n\n```py\nfrom localtileserver import get_leaflet_tile_layer, TileClient\nfrom ipyleaflet import Map\n\n# First, create a tile server from local raster file\nclient = TileClient('path/to/geo.tif')\n\n# Create ipyleaflet tile layer from that server\nt = get_leaflet_tile_layer(client)\n\nm = Map(center=client.center(), zoom=client.default_zoom)\nm.add(t)\nm\n```\n\n![ipyleaflet](https://raw.githubusercontent.com/banesullivan/localtileserver/main/imgs/ipyleaflet.png)\n\n## \u2139\ufe0f Overview\n\nThe `TileClient` class can be used to to launch a tile server in a background\nthread which will serve raster imagery to a viewer (usually `ipyleaflet` or\n`folium` in Jupyter notebooks).\n\nThis tile server can efficiently deliver varying resolutions of your\nraster imagery to your viewer; it helps to have pre-tiled,\n[Cloud Optimized GeoTIFFs (COGs)](https://www.cogeo.org/).\n\nThere is an included, standalone web viewer leveraging\n[CesiumJS](https://cesium.com/platform/cesiumjs/).\n\n\n## \u2b07\ufe0f Installation\n\nGet started with `localtileserver` to view rasters in Jupyter or deploy as your\nown Flask application.\n\n### \ud83d\udc0d Installing with `conda`\n\nConda makes managing `localtileserver`'s dependencies across platforms quite\neasy and this is the recommended method to install:\n\n```bash\nconda install -c conda-forge localtileserver\n```\n\n### \ud83c\udfa1 Installing with `pip`\n\nIf you prefer pip, then you can install from PyPI: https://pypi.org/project/localtileserver/\n\n```\npip install localtileserver\n```\n\n## \ud83d\udcad Feedback\n\nPlease share your thoughts and questions on the [Discussions](https://github.com/banesullivan/localtileserver/discussions) board.\nIf you would like to report any bugs or make feature requests, please open an issue.\n\nIf filing a bug report, please share a scooby `Report`:\n\n```py\nimport localtileserver\nprint(localtileserver.Report())\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "Locally serve geospatial raster tiles in the Slippy Map standard.",
"version": "0.10.3",
"project_urls": {
"Bug Tracker": "https://github.com/banesullivan/localtileserver/issues",
"Documentation": "https://localtileserver.banesullivan.com",
"Source Code": "https://github.com/banesullivan/localtileserver"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d2146a865b1e72941eda8106933c3121ec514bbfd15af0f755ba93148a5f1a8c",
"md5": "9f863a20569c38bf0900bf8c452ade2f",
"sha256": "942f127e087c8d9ee668c3200aa55c55a38d735ad1d8fd98dbe43029533c2e42"
},
"downloads": -1,
"filename": "localtileserver-0.10.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9f863a20569c38bf0900bf8c452ade2f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 17103406,
"upload_time": "2024-05-17T06:43:30",
"upload_time_iso_8601": "2024-05-17T06:43:30.039244Z",
"url": "https://files.pythonhosted.org/packages/d2/14/6a865b1e72941eda8106933c3121ec514bbfd15af0f755ba93148a5f1a8c/localtileserver-0.10.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d1f3f6b00453f56f456795d357c4978708b2d24d1c46e51e8707c2cbe1ec54cd",
"md5": "898410d3159a8068fe3c9323fb3594f2",
"sha256": "eccd10126d85835356243e0f6044b1631e6c200ed96d46a4626bf1aef0729bd6"
},
"downloads": -1,
"filename": "localtileserver-0.10.3.tar.gz",
"has_sig": false,
"md5_digest": "898410d3159a8068fe3c9323fb3594f2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 17095812,
"upload_time": "2024-05-17T06:43:34",
"upload_time_iso_8601": "2024-05-17T06:43:34.217831Z",
"url": "https://files.pythonhosted.org/packages/d1/f3/f6b00453f56f456795d357c4978708b2d24d1c46e51e8707c2cbe1ec54cd/localtileserver-0.10.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-17 06:43:34",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "banesullivan",
"github_project": "localtileserver",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "click",
"specs": []
},
{
"name": "flask",
"specs": [
[
"<",
"4"
],
[
">=",
"2.0.0"
]
]
},
{
"name": "Flask-Caching",
"specs": []
},
{
"name": "flask-cors",
"specs": []
},
{
"name": "flask-restx",
"specs": [
[
">=",
"0.5.0"
]
]
},
{
"name": "gunicorn",
"specs": []
},
{
"name": "matplotlib",
"specs": []
},
{
"name": "pytest",
"specs": []
},
{
"name": "pytest-cov",
"specs": []
},
{
"name": "rasterio",
"specs": []
},
{
"name": "requests",
"specs": []
},
{
"name": "rio-cogeo",
"specs": []
},
{
"name": "rio-tiler",
"specs": []
},
{
"name": "scooby",
"specs": []
},
{
"name": "sentry-sdk",
"specs": []
},
{
"name": "server-thread",
"specs": []
},
{
"name": "werkzeug",
"specs": []
}
],
"lcname": "localtileserver"
}