📖 API#
+📖 API#
Python Client#
+Python Client#
- -localtileserver.get_or_create_tile_client(source: Path | str | TileClient | DatasetReaderBase, port: int | str = 'default', debug: bool = False)# +localtileserver.get_or_create_tile_client(source: Path | str | TileClient | DatasetReaderBase, port: int | str = 'default', debug: bool = False)#
A helper to safely get a TileClient from a path on disk.
Note
@@ -426,7 +425,7 @@Python Client
- -class localtileserver.client.TilerInterface(source: Path | str | DatasetReaderBase)#
+class localtileserver.client.TilerInterface(source: Path | str | DatasetReaderBase)#Base TileClient methods and configuration.
This class interfaces directly with rasterio and rio-tiler.
-
@@ -436,12 +435,12 @@
- -bounds(projection: str = 'EPSG:4326', return_polygon: bool = False, return_wkt: bool = False)# +bounds(projection: str = 'EPSG:4326', return_polygon: bool = False, return_wkt: bool = False)#
Python Client
- -center(projection: str = 'EPSG:4326', return_point: bool = False, return_wkt: bool = False)# +center(projection: str = 'EPSG:4326', return_point: bool = False, return_wkt: bool = False)#
Get center in the form of (y <lat>, x <lon>).
- Parameters: @@ -457,52 +456,52 @@
- -property dataset# +property dataset#
Python Client
- -thumbnail(indexes: List[int] | None = None, colormap: str | None = None, vmin: float | None = None, vmax: float | None = None, nodata: int | float | None = None, output_path: Path | None = None, encoding: str = 'PNG', max_size: int = 512)# +thumbnail(indexes: List[int] | None = None, colormap: str | None = None, vmin: float | None = None, vmax: float | None = None, nodata: int | float | None = None, output_path: Path | None = None, encoding: str = 'PNG', max_size: int = 512)#
Generate a thumbnail preview of the dataset.
- Parameters: @@ -522,7 +521,7 @@
- -tile(z: int, x: int, y: int, indexes: List[int] | None = None, colormap: str | None = None, vmin: float | None = None, vmax: float | None = None, nodata: int | float | None = None, output_path: Path | None = None, encoding: str = 'PNG', band: int | List[int] | None = None)# +tile(z: int, x: int, y: int, indexes: List[int] | None = None, colormap: str | None = None, vmin: float | None = None, vmax: float | None = None, nodata: int | float | None = None, output_path: Path | None = None, encoding: str = 'PNG', band: int | List[int] | None = None)#
Generate a tile from the source raster.
- Parameters: @@ -547,7 +546,7 @@
- -class localtileserver.TileClient(source: Path | str | DatasetReaderBase, port: int | str = 'default', debug: bool = False, host: str = '127.0.0.1', client_port: int | None = None, client_host: str | None = None, client_prefix: str | None = None, cors_all: bool = False)# +class localtileserver.TileClient(source: Path | str | DatasetReaderBase, port: int | str = 'default', debug: bool = False, host: str = '127.0.0.1', client_port: int | None = None, client_host: str | None = None, client_prefix: str | None = None, cors_all: bool = False)#
Tile client interface for generateing and serving tiles.
- Parameters: @@ -566,10 +565,10 @@
- -localtileserver.get_leaflet_tile_layer(source: Path | str | TileClient | DatasetReaderBase, port: int | str = 'default', debug: bool = False, indexes: List[int] | None = None, colormap: str | None = None, vmin: float | None = None, vmax: float | None = None, nodata: int | float | None = None, attribution: str | None = None, **kwargs)# +localtileserver.get_leaflet_tile_layer(source: Path | str | TileClient | DatasetReaderBase, port: int | str = 'default', debug: bool = False, indexes: List[int] | None = None, colormap: str | None = None, vmin: float | None = None, vmax: float | None = None, nodata: int | float | None = None, attribution: str | None = None, **kwargs)#
Generate an ipyleaflet TileLayer for the given TileClient.
- Parameters: @@ -602,7 +601,7 @@
- -localtileserver.get_folium_tile_layer(source: Path | str | TileClient | DatasetReaderBase, port: int | str = 'default', debug: bool = False, indexes: List[int] | None = None, colormap: str | None = None, vmin: float | None = None, vmax: float | None = None, nodata: int | float | None = None, attr: str | None = None, **kwargs)# +localtileserver.get_folium_tile_layer(source: Path | str | TileClient | DatasetReaderBase, port: int | str = 'default', debug: bool = False, indexes: List[int] | None = None, colormap: str | None = None, vmin: float | None = None, vmax: float | None = None, nodata: int | float | None = None, attr: str | None = None, **kwargs)#
Generate a folium TileLayer for the given TileClient.
- Parameters: @@ -635,10 +634,10 @@
- -localtileserver.helpers.save_new_raster(src, data, out_path: str | None = None)# +localtileserver.helpers.save_new_raster(src, data, out_path: str | None = None)#
Save new raster from a numpy array using the metadata of another raster.
Note
@@ -658,17 +657,17 @@Other Helpers
- -localtileserver.make_vsi(url: str, **options)#
+localtileserver.make_vsi(url: str, **options)#- -localtileserver.validate.validate_cog(path: str | Reader | TilerInterface, strict: bool = True, quiet: bool = False) bool # +localtileserver.validate.validate_cog(path: str | Reader | TilerInterface, strict: bool = True, quiet: bool = False) bool #
- -localtileserver.helpers.polygon_to_geojson(polygon) str # +localtileserver.helpers.polygon_to_geojson(polygon) str #
Dump shapely.Polygon to GeoJSON.
Other Helpers
V
diff --git a/index.html b/index.html index ebedbc25..60a536ba 100644 --- a/index.html +++ b/index.html @@ -28,13 +28,12 @@ - + - - - - + + + @@ -42,12 +41,12 @@ - - - + + + - - + + @@ -383,7 +382,7 @@- 🌐 localtileserver#
+🌐 localtileserver#
Need to visualize a rather large (gigabytes+) raster? This is for you.
@@ -410,7 +409,7 @@🌐 localtileserver
Jupyter Widget Helpers
- Other Helpers#
+Other Helpers#
Jupyter Widget Helpers
Python Client -
Jupyter Widget Helpers#
+Jupyter Widget Helpers#
Python Client
Python Client
A Python package for serving tiles from large raster files in @@ -421,7 +420,7 @@
🌐 localtileserver -
🌟 Highlights#
+🌟 Highlights#
Launch a tile server for large geospatial images
View local or remote* raster files with
ipyleaflet
orfolium
in Jupyter
@@ -430,7 +429,7 @@
🌟 Highlights -
ℹ️ Overview#
+ℹ️ Overview#
The
@@ -441,7 +440,7 @@TileClient
class can be used to to launch a tile server in a background thread which will serve raster imagery to a viewer (seeipyleaflet
andfolium
examples in 🚀 User Guide).ℹ️ OverviewCesiumJS.