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

COG support: allow construction from URL and add getValues method #31

Closed mhiley closed 5 years ago

mhiley commented 5 years ago

@DanielJDufour this is a first stab at COG support to address #7 .

The parseGeoraster function now supports constructing a georaster by specifying a URL instead of a data array. In this case, the geotiff.js fromUrl function is used instead of fromArrayBuffer. This allows raster values to be lazily loaded as needed via the new getValues method, which calls the geotiff.js readRasters method which is optimized for reading COGs.

Let me know if you think this is headed in the right direction and if you have any suggestions! Thanks!

DanielJDufour commented 5 years ago

@mhiley awesome! reviewing now!

DanielJDufour commented 5 years ago

@mhiley , great job! Definitely headed in the right direction. I think it's almost ready to be merged. Could you check the comments I made inline and let me know what you think?

You can also ignore code climate and Travis CI checks. Seems like there's an unrelated issue in the testing pipeline causing things to timeout.

@mhiley , would you also be able to add in a test for a COG to https://github.com/GeoTIFF/georaster/blob/master/test/test.js?

Thanks so much and looking forward to it!

Also going to start reviewing https://github.com/GeoTIFF/georaster-layer-for-leaflet/pull/11 now!