New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
expose array+profile API #89
Comments
Hey @j08lue thanks for this issue.
In short term I think this could make thing a bit complex and definitely be a breacking change.
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 Line 109 in d08e985
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
|
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 |
Yes, I will be happy to review it.
Not sure to understand here |
😄 haha, nevermind. I'll submit a PR shortly. |
I often want to write data from numpy arrays as a cloud-optimized GeoTIFF, together with the usual
rasterio
profile dictionary (transform
,crs
,width
,height
,dtype
, etc.). It would be super nice to have a Python API for this.This would require splitting the large
cogeo.cog_translate
function into two at least, roughly here:rio-cogeo/rio_cogeo/cogeo.py
Line 226 in 4c6e890
or, if that becomes too complicated, create a separate function for this, like
What do you think? Would this make sense to add to this package? Or will this package anyways be superseded by the new
COG
driver in GDAL?The text was updated successfully, but these errors were encountered: