GeoTIFF / georaster-layer-for-leaflet

Display GeoTIFFs and soon other types of raster on your Leaflet Map
https://geotiff.github.io/georaster-layer-for-leaflet-example/
Apache License 2.0
306 stars 58 forks source link

Dependencies missing #18

Closed m-mohr closed 4 years ago

m-mohr commented 5 years ago

Describe the bug If I do npm install this package, it doesn't install georaster package, but examples use it. The documentation doesn't say whether users should install it their self. I'd say it should be part of the dependencies in package.json or mentioned to be installed by users.

DanielJDufour commented 5 years ago

Excellent point to bring up @m-mohr . I definitely need to make my thinking more clear. There's two main things going on:

1) Applications like https://geotiff.io that have an analysis piece usually via geoblaze in addition to visualization will load the georaster outside of this visualization library. I made the decision to make georaster a peer dependency instead of baked into the georaster-layer-for-leaflet build because I didn't want web applications to have to load the georaster code twice or include it twice in the build. I think Webpack is getting smarter, so perhaps this is no longer an issue. Happy to be updated :-) 2) I would like to avoid having to republish georaster-layer-for-leaflet every time that georaster is updated. Unfortunately, I don't have a lot of bandwidth at the moment and am trying to minimize the long-term maintenance cost while also meeting my maintenance responsibilities. Perhaps this can be automated?

I hope this makes sense. Definitely open to your thoughts.

Action Items

I'm open to PRs if you want to take this on. Unfortunately, I won't have time for about the next week.

Thank you again for surfacing this confusion! :-)

m-mohr commented 5 years ago

Totally makes sense and the action items should be enough to solve the issue.

Unfortunately, the decision in my project was made to probably switch to OpenLayers, so not sure how much time I can invest here.

DanielJDufour commented 5 years ago

@m-mohr , word. we're actually thinking of switching over geotiff.io to OpenLayers. Would be great to collaborate with @constantinius on an OpenLayers alternative. He built a demo in open layers you might have heard of: https://github.com/geotiffjs/cog-explorer, but AFAIK, it's not a lib you can install from NPM.

m-mohr commented 5 years ago

Yes, I'm just looking around to find a GeoTiff library for OpenLayers. Indeed, EOX worked on it, but it needs some work to make it a full library. Maybe we could really collab on that.

DanielJDufour commented 5 years ago

Also, would be great if we could eventually add COG support to OpenLayers!

constantinius commented 5 years ago

COG-Explorer is a proof of concept and a benchmark whether displaying large COGs is even feasible. So the app is definitely not polished enough to use as a base, but I think concepts and code are definitely reusable. In my opinion, the display of such files consists of three parts: geotiff parsing (what geotiff.js already provides), rendering of the data to RGBs (that is whats missing) and then putting this data on a map. (OpenLayers gives a starting point for that, but it can definitely improved). At EOX, we are already investigating that matter, and want to present a solution at foss4g, but I guess we will just show the status quo of COG explorer. We are also in contact with @IvanSanchez who participates on the EO data challenge with a very similar target. Apart from that, I would love to see some collaboration on that topic!

DanielJDufour commented 4 years ago

I've added georaster as a peer dependency and added some documentation about it to the README.md.