Code Monkey home page Code Monkey logo

Comments (4)

vincentsarago avatar vincentsarago commented on May 23, 2024

Hey @j08lue thanks for this issue.

What do you think? Would this make sense to add to this package?

In short term I think this could make thing a bit complex and definitely be a breacking change.

Or will this package anyways be superseded by the new COG driver in GDAL?

This is still to be defined, To be honest I guess most of the feature of rio-cogeo will be replaced by the new GDAL COG driver, but I think there is still one-two feature that won't, but I need to better study the subject.

Back to array to cog, we could maybe to a simple change to allow memory file as input (instead of path). in

with rasterio.open(src_path) as src_dst:

we could maybe to a simple check to see if we have an already open file (memory file) or if we need to open it (like in https://github.com/cogeotiff/rio-tiler/blob/master/rio_tiler/utils.py#L403-L407), thus you could do something like

with MemoryFile() as memfile:
    with memfile.open(** src_profile) as mem:
         mem.write(data)
         cog_translate(mem, *args, **kwargs)

from rio-cogeo.

j08lue avatar j08lue commented on May 23, 2024

we could maybe to a simple check to see if we have an already open file (memory file) or if we need to open it

That solution would serve me very well! Should I submit a PR or can you implement this quickly?

Btw, I actually have a working implementation of this API already, but the COGs are not fully valid and I would like to merge into using rio-cogeo instead.

from rio-cogeo.

vincentsarago avatar vincentsarago commented on May 23, 2024

That solution would serve me very well! Should I submit a PR or can you implement this quickly?

Yes, I will be happy to review it.

Btw, I actually have a working implementation of this API already, but the COGs are not fully valid and I would like to merge into using rio-cogeo instead.

Not sure to understand here

from rio-cogeo.

j08lue avatar j08lue commented on May 23, 2024

Not sure to understand here

😄 haha, nevermind. I'll submit a PR shortly.

from rio-cogeo.

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.