GeoTIFF / georaster

Wrapper around Georeferenced Rasters like GeoTIFF and soon JPG and PNG that provides a standard interface
Apache License 2.0
81 stars 32 forks source link

Support passing HTTP headers to the GeoTiff request #77

Open m-mohr opened 1 year ago

m-mohr commented 1 year ago

Is your feature request related to a problem? Please describe.

I have COGs that I need a Bearer token to via a HTTP header.

Describe the solution you'd like

I'd like to be able to pass options to the HTTP request. This should be possible to provide to the fromUrl(s) methods of geotiff.js. OpenLayers also does it and could be used as a reference.

Additional context Code: https://github.com/GeoTIFF/georaster/blob/master/src/index.js#L94

Related issues:

ajgrowney commented 1 year ago

We ran into this same issue at Maxar and have a local build of this package with this fix. I'll try to put out a PR for it this week to see if it meets your needs too.

ajgrowney commented 1 year ago

@DanielJDufour I have a local branch ready to open a pull request but get the following error: remote: Permission to GeoTIFF/georaster.git denied to ajgrowney. Are there any prerequisites to being a contributor?

m-mohr commented 1 year ago

You can fork the repo, commit there and then open a PR from it to this repo, no?

DanielJDufour commented 1 year ago

👋 Thanks for all your help! I just published a new version of georaster under the @next tag. If you have time, please let me know if it works for you!