Git Product home page Git Product logo

Comments (5)

DanielJDufour avatar DanielJDufour commented on July 30, 2024

from georaster.

sammertime avatar sammertime commented on July 30, 2024

Thanks for the prompt reply Daniel!! Much appreciated..

So it sounds like an error I can just ignore when using parseGeoraster on a cog? i.e. not going the arrayBuffer route.

I've switched over to that method but now it looks like the mins, maxs, and ranges are missing from georaster. Is that expected behavior i.e. do I need to extract that information using another method when using parseGeoraster without an arrayBuffer?

Sorry for doubling up on the question.

Thanks!!
S

from georaster.

DanielJDufour avatar DanielJDufour commented on July 30, 2024

No prob. They are great questions and the answers will help others who read this, too!

Q: So it sounds like an error I can just ignore when using parseGeoraster on a cog?
A: Yes that is correct

Q: I've switched over to that method but now it looks like the mins, maxs, and ranges are missing from georaster. Is that expected behavior i.e. do I need to extract that information using another method when using parseGeoraster without an arrayBuffer?
A: It's expected because georaster wants to avoid calculating statistics which would require it to fetch all the pixel data. You don't need statistics to do a visualization as newer versions of GeoRasterLayer (if you are using LeafletJS) will dynamically calculate statistics from the user rendered pixels. It's not the true stats, but good enough for most visualization. Because it's JavaScript, you can also directly add mins, maxs and ranges properties to the georaster object as well. You could also just specify a pixelValuesToColorFn.

Note: I'm doing a big multi-year refactor of georaster and improving statistical calculations is definitely a part of that. I think currently, it won't read COG's GDAL stats metadata, but that will improve in the future.

Let me know if you have any other questions.

from georaster.

sammertime avatar sammertime commented on July 30, 2024

10-4! Understood - thanks again! I plan to use a pixelValuesToColorFn and was doing so using the min/max/ranges and the arrayBuffer method but now I just need to figure out how to do the same using parseGeoraster without arrayBuffer - working on that now : )

S

from georaster.

sammertime avatar sammertime commented on July 30, 2024

Hi again Daniel,

Another question regarding this packages .ovr file detection. Though my cog's are loading as expected, the performance/speed of load is not what I was hoping for. In looking into it via the "network" tab of the developer tools, I'm wondering if it's because of the query for the external overview files that don't exist on my end. Attached is a screenshot of the network tab when I load a single cog on the map. That top line in red is the query for the external overview and, as you can see, it's eating up the majority of time to load compared with the cog, which was in the browser cache for this example.

I *think I read elsewhere that there is no way around this at this time? If that's the case and considering performance is of a high priority for me, would I be better off for the time being going with another package? If so, any suggestions? i.e. should I go with geotiff.js instead?

I'd love to use this package but if I'm unable to get around the default query for external overviews, I'm wondering if it makes sense to use another package for now - understanding of course that there is an overhaul underway, as you mentioned.

Many thanks,
S

Screen Shot 2022-09-26 at 18 26 29

from georaster.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.