From 219ca77cb28c2aad2f24f5b082a23303d5806219 Mon Sep 17 00:00:00 2001 From: banesullivan Date: Mon, 22 Jan 2024 00:37:23 +0000 Subject: [PATCH] deploy: e418ff4793fcc4d9e8fef40a4209d3467db4264c --- 404.html | 21 ++++---- _static/basic.css | 22 +++++++++ _static/documentation_options.js | 3 +- _static/searchtools.js | 26 ++++++---- _static/sphinx_highlight.js | 16 ++++-- api/index.html | 73 ++++++++++++++-------------- genindex.html | 21 ++++---- index.html | 33 ++++++------- installation/docker.html | 25 +++++----- installation/index.html | 27 +++++----- installation/remote-jupyter.html | 23 +++++---- search.html | 21 ++++---- searchindex.js | 2 +- user-guide/bokeh.html | 35 +++++++------ user-guide/compare.html | 27 +++++----- user-guide/example-data.html | 23 +++++---- user-guide/hillshade.html | 23 +++++---- user-guide/in-memory.html | 23 +++++---- user-guide/index.html | 53 ++++++++++---------- user-guide/ipyleaflet_deep_zoom.html | 27 +++++----- user-guide/rasterio.html | 23 +++++---- user-guide/remote-cog.html | 43 ++++++++-------- user-guide/rgb.html | 27 +++++----- user-guide/validate_cog.html | 23 +++++---- user-guide/web-app.html | 23 +++++---- 25 files changed, 341 insertions(+), 322 deletions(-) diff --git a/404.html b/404.html index 5347a48c..b8f98e97 100644 --- a/404.html +++ b/404.html @@ -27,13 +27,12 @@ - + - - - - + + + @@ -41,12 +40,12 @@ - - - + + + - - + + @@ -441,7 +440,7 @@

Page not found.

diff --git a/_static/basic.css b/_static/basic.css index 61572969..e760386b 100644 --- a/_static/basic.css +++ b/_static/basic.css @@ -237,6 +237,10 @@ a.headerlink { visibility: hidden; } +a:visited { + color: #551A8B; +} + h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, @@ -670,6 +674,16 @@ dd { margin-left: 30px; } +.sig dd { + margin-top: 0px; + margin-bottom: 0px; +} + +.sig dl { + margin-top: 0px; + margin-bottom: 0px; +} + dl > dd:last-child, dl > dd:last-child > :last-child { margin-bottom: 0; @@ -738,6 +752,14 @@ abbr, acronym { cursor: help; } +.translated { + background-color: rgba(207, 255, 207, 0.2) +} + +.untranslated { + background-color: rgba(255, 207, 207, 0.2) +} + /* -- code displays --------------------------------------------------------- */ pre { diff --git a/_static/documentation_options.js b/_static/documentation_options.js index 449846db..04a6ee4c 100644 --- a/_static/documentation_options.js +++ b/_static/documentation_options.js @@ -1,5 +1,4 @@ -var DOCUMENTATION_OPTIONS = { - URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), +const DOCUMENTATION_OPTIONS = { VERSION: '0.10.0rc2', LANGUAGE: 'en', COLLAPSE_INDEX: false, diff --git a/_static/searchtools.js b/_static/searchtools.js index 97d56a74..7918c3fa 100644 --- a/_static/searchtools.js +++ b/_static/searchtools.js @@ -57,12 +57,12 @@ const _removeChildren = (element) => { const _escapeRegExp = (string) => string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string -const _displayItem = (item, searchTerms) => { +const _displayItem = (item, searchTerms, highlightTerms) => { const docBuilder = DOCUMENTATION_OPTIONS.BUILDER; - const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT; const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX; const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX; const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY; + const contentRoot = document.documentElement.dataset.content_root; const [docName, title, anchor, descr, score, _filename] = item; @@ -75,20 +75,24 @@ const _displayItem = (item, searchTerms) => { if (dirname.match(/\/index\/$/)) dirname = dirname.substring(0, dirname.length - 6); else if (dirname === "index/") dirname = ""; - requestUrl = docUrlRoot + dirname; + requestUrl = contentRoot + dirname; linkUrl = requestUrl; } else { // normal html builders - requestUrl = docUrlRoot + docName + docFileSuffix; + requestUrl = contentRoot + docName + docFileSuffix; linkUrl = docName + docLinkSuffix; } let linkEl = listItem.appendChild(document.createElement("a")); linkEl.href = linkUrl + anchor; linkEl.dataset.score = score; linkEl.innerHTML = title; - if (descr) + if (descr) { listItem.appendChild(document.createElement("span")).innerHTML = " (" + descr + ")"; + // highlight search terms in the description + if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js + highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted")); + } else if (showSearchSummary) fetch(requestUrl) .then((responseData) => responseData.text()) @@ -97,6 +101,9 @@ const _displayItem = (item, searchTerms) => { listItem.appendChild( Search.makeSearchSummary(data, searchTerms) ); + // highlight search terms in the summary + if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js + highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted")); }); Search.output.appendChild(listItem); }; @@ -115,14 +122,15 @@ const _finishSearch = (resultCount) => { const _displayNextItem = ( results, resultCount, - searchTerms + searchTerms, + highlightTerms, ) => { // results left, load the summary and display it // this is intended to be dynamic (don't sub resultsCount) if (results.length) { - _displayItem(results.pop(), searchTerms); + _displayItem(results.pop(), searchTerms, highlightTerms); setTimeout( - () => _displayNextItem(results, resultCount, searchTerms), + () => _displayNextItem(results, resultCount, searchTerms, highlightTerms), 5 ); } @@ -360,7 +368,7 @@ const Search = { // console.info("search results:", Search.lastresults); // print the results - _displayNextItem(results, results.length, searchTerms); + _displayNextItem(results, results.length, searchTerms, highlightTerms); }, /** diff --git a/_static/sphinx_highlight.js b/_static/sphinx_highlight.js index aae669d7..8a96c69a 100644 --- a/_static/sphinx_highlight.js +++ b/_static/sphinx_highlight.js @@ -29,14 +29,19 @@ const _highlight = (node, addItems, text, className) => { } span.appendChild(document.createTextNode(val.substr(pos, text.length))); + const rest = document.createTextNode(val.substr(pos + text.length)); parent.insertBefore( span, parent.insertBefore( - document.createTextNode(val.substr(pos + text.length)), + rest, node.nextSibling ) ); node.nodeValue = val.substr(0, pos); + /* There may be more occurrences of search term in this node. So call this + * function recursively on the remaining fragment. + */ + _highlight(rest, addItems, text, className); if (isInSVG) { const rect = document.createElementNS( @@ -140,5 +145,10 @@ const SphinxHighlight = { }, }; -_ready(SphinxHighlight.highlightSearchWords); -_ready(SphinxHighlight.initEscapeListener); +_ready(() => { + /* Do not call highlightSearchWords() when we are on the search page. + * It will highlight words from the *previous* search query. + */ + if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords(); + SphinxHighlight.initEscapeListener(); +}); diff --git a/api/index.html b/api/index.html index c7e36aee..adab9ddd 100644 --- a/api/index.html +++ b/api/index.html @@ -28,13 +28,12 @@ - + - - - - + + + @@ -42,12 +41,12 @@ - - - + + + - - + + @@ -409,12 +408,12 @@
-

📖 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 @@

Python Client
-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)#

-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 @@

Python Client
-property dataset#
+property dataset#

-property default_zoom#
+property default_zoom#
-property filename#
+property filename#
-property info#
+property info#
-property max_zoom#
+property max_zoom#
-property metadata#
+property metadata#
-property min_zoom#
+property min_zoom#
-point(lon: float, lat: float, **kwargs)#
+point(lon: float, lat: float, **kwargs)#
-property reader#
+property reader#
-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 @@

Python Client
-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 @@

Python Client
-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 @@

Python Client -

Jupyter Widget Helpers#

+

Jupyter Widget Helpers#

-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 @@

Jupyter Widget Helpers
-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 @@

Jupyter Widget Helpers
-

Other Helpers#

+

Other Helpers#

-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.

@@ -768,7 +767,7 @@

Other Helpers

- Created using Sphinx 7.0.1. + Created using Sphinx 7.2.6.

diff --git a/genindex.html b/genindex.html index 7e696cfc..6922f642 100644 --- a/genindex.html +++ b/genindex.html @@ -27,13 +27,12 @@ - + - - - - + + + @@ -41,12 +40,12 @@ - - - + + + - - + + @@ -560,7 +559,7 @@

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

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 or folium in Jupyter

  • @@ -430,7 +429,7 @@

    🌟 Highlights -

    ℹ️ Overview#

    +

    ℹ️ 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 (see ipyleaflet and folium examples in 🚀 User Guide).

    @@ -441,7 +440,7 @@

    ℹ️ OverviewCesiumJS.

-

🪢 Community Usage#

+

🪢 Community Usage#