Skip to content

Extending pearcetm's excellent OSD TileSource to use ES6 imports and support JPEG-2000 compression.

License

Notifications You must be signed in to change notification settings

episphere/GeoTIFFTileSource-JPEG2k

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NOTE:

This is a fork of pearcetm's original OpenSeadragon plugin meant to use ES6 imports to encapsulate the GeoTIFF.js dependency inside the TileSource itself. Also, this fork supports TIFF pyramids compressed using JPEG-2000 by leveraging the WASM port of OpenJPEG provided by the great folk at CornerstoneJS!

GeoTIFFTileSource

Implementation of a TileSource for OpenSeadragon based on geotiff.js, enabling local and remote TIFF files to be viewed without using an image server.

See it in action at https://pearcetm.github.io/GeoTIFFTileSource/demo.html

How to create GeoTIFF files

In order to generate a GeoTIFF file compatible with this library, you can for instance use sharp, a High performance Node.js image processing library.

import sharp from 'sharp'

sharp('input.jpg', {limitInputPixels:false})
    .tiff({tile:true, pyramid:true})
    .toFile('output.tiff')
    .then(console.log)
    .catch(console.error);

Many options are available.

Check sharp documentation on TIFF output format.

Prerequisites for remote files - HTTP range requests

This library works by loading only parts of the remote TIFF file (which may be huge). For this, the remote http server has to be compatible. Most production-ready http servers are compatible, but some development servers (such as python3 -m http.server or PHP built-in development web server) are not.

Check Mozilla documentation on HTTP range requests.

About

Extending pearcetm's excellent OSD TileSource to use ES6 imports and support JPEG-2000 compression.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%