Giter Site home page Giter Site logo

Comments (13)

kirangkumar avatar kirangkumar commented on June 2, 2024 1

@vincentsarago Sorry was busy with other stuffs, the rio-tiler version I am using is 4.1.10 which is greater than 4.1.6. So I feel it should work

from rio-tiler.

kirangkumar avatar kirangkumar commented on June 2, 2024 1

@vincentsarago thanks for all the support. I can confirm it is working for me. Thanks again, closing the issue

from rio-tiler.

vincentsarago avatar vincentsarago commented on June 2, 2024

Hi @kirangkumar,

from rio-tiler.

kirangkumar avatar kirangkumar commented on June 2, 2024

Hi @vincentsarago here are answers to your questions:

  1. what version of titiler are you using?
  • I am using the latest version titiler from main branch
  1. are you using a custom factory?
    No I am not using custom factory
  2. can you share the full URL you're trying to use
    The URL is http://127.0.0.1:9070/stac/preview?format=png&url=https://planetarycomputer.microsoft.com/api/stac/v1/collections/landsat-8-c2-l2/items/LC08_L2SP_229061_20220324_02_T1&assets=SR_B4&assets=SR_B3&assets=SR_B2&color_formula=gamma+RGB+2.7%2C+saturation+1.5%2C+sigmoidal+RGB+15+0.55
  3. Error message:
    Hope this is sufficient:
  File "/Users/kiran/pixxel/titiler/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "/Users/kiran/pixxel/titiler/src/titiler/core/titiler/core/factory.py", line 914, in preview
    image.apply_color_formula(color_formula)
  File "/Users/kiran/pixxel/titiler/venv/lib/python3.10/site-packages/rio_tiler/models.py", line 551, in apply_color_formula
    self.array.data = scale_dtype(ops(to_math_type(out)), numpy.uint8)
AttributeError: can't set attribute 'data'

from rio-tiler.

vincentsarago avatar vincentsarago commented on June 2, 2024

the latest titiler shouldn't be used with rio-tiler <4.1.6

https://github.com/developmentseed/titiler/blob/main/src/titiler/core/pyproject.toml#L38

from rio-tiler.

vincentsarago avatar vincentsarago commented on June 2, 2024

also note that with stac you'll need to set asset_as_band=True to work with single band stored as multiple files

from rio-tiler.

vincentsarago avatar vincentsarago commented on June 2, 2024

any update @kirangkumar ?

from rio-tiler.

kirangkumar avatar kirangkumar commented on June 2, 2024

image

Here's the details about rio-tiler version I am using.

from rio-tiler.

kirangkumar avatar kirangkumar commented on June 2, 2024

And I am using one band in one file, so I guess, asset_as_band=True is not required. But I tried that option too before creating the issue, since there was no luck, I thought of asking help here

from rio-tiler.

vincentsarago avatar vincentsarago commented on June 2, 2024

Wait, It seems you are using rio-tiler from dev branch not the one from pypi!

Dev

out = scale_dtype(ops(to_math_type(out)), numpy.uint8)

4.1.10

data = scale_dtype(ops(to_math_type(data)), numpy.uint8)

I should update the version in the GitHub branch to avoid confusion, sorry about this

from rio-tiler.

kirangkumar avatar kirangkumar commented on June 2, 2024

@vincentsarago No worries, thanks for the quick help. I will upgrade my code from dev to main. Can you please let me know what is the version in main?

from rio-tiler.

vincentsarago avatar vincentsarago commented on June 2, 2024

main should be 4.1.10

from rio-tiler.

vincentsarago avatar vincentsarago commented on June 2, 2024

this should be fixed with latest commit ee1d7c4

please could you close the issue once you confirm it's resolved on your side 🙏

from rio-tiler.

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.