Skip to content

**not** hosting a cog in jupyter #243

@pvgenuchten

Description

@pvgenuchten

as part of grid topic, i wanted to show the benefits of cog (as part of a python based conversion to cog)

ipyleaflet and leafmap do support cog/tiff, by running a tileserver which serves tiles of the cog to the frontend

it is possible to load the cog directly with openlayers

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ol@latest/ol.css">
<script src="https://cdn.jsdelivr.net/npm/geotiff@3.0.5/dist-browser/geotiff.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/ol@latest/dist/ol.js"></script>
<div id="map" style="width:100%; height:500px"></div>
<script>
new ol.Map({
  target: 'map',
  layers: [
    new ol.layer.Tile({source: new ol.source.OSM()}),
    new ol.layer.WebGLTile({source: new ol.source.GeoTIFF({sources: [{url: "/notebooks/content/notebooks/output_4326_cog.tif"}]}),opacity: 0.8})
  ],
  view: new ol.View({center: ol.proj.fromLonLat([5.67, 51.97]), zoom: 10})
});
</script>

however unfortunately does the jupyter embedded webserver not support range requests...

what shall i do?

  • keep current tileserver implementation (is it usefull?)
  • remove example

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions