geotiffjs / geotiff.js

geotiff.js is a small library to parse TIFF files for visualization or analysis. It is written in pure JavaScript, and is usable in both the browser and node.js applications.
https://geotiffjs.github.io/
MIT License
859 stars 179 forks source link

Make it possible to build a RemoteSource with a user-provided client #370

Closed sguimmara closed 1 year ago

sguimmara commented 1 year ago

This PR exposes the BaseClient and BaseResponse classes in the API, as well as a new builder function: fromCustomClient(). fromCustomClient is used to build a GeoTIFF object from a user-provided client (that implements BaseClient).

The use case is when the user is not satisfied with the available clients (fetch, XHR, HTTP), and must use their own client.

Fix #368

sguimmara commented 1 year ago

@constantinius would you be willing to review this PR ?

constantinius commented 1 year ago

Sorry, was on vacation. PR looks good.