Skip to content
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

Saving GeoTiff, compression and unclear code #32

Open
culebron opened this issue Mar 20, 2018 · 6 comments
Open

Saving GeoTiff, compression and unclear code #32

culebron opened this issue Mar 20, 2018 · 6 comments

Comments

@culebron
Copy link

I wanted to add compression to GeoTiff, and turns out that there's no such option, and the functions code is quite coupled.

create_geotiff function receives gdal driver as a parameter, and it's not reused anywhere. Does it really need the driver parameter?

https://github.com/ozak/georasters/blob/master/georasters/georasters.py#L478

@ozak
Copy link
Owner

ozak commented Mar 20, 2018

the function which is defined here needs the driver input. I agree this is not optimal, and it would be better to have either a more general function where users can pass whatever they need and various predefined types. In this case this is predefined and nothing else can be passed to the gdal driver. I have been considering moving to rasterio #3, which perhaps may be more flexible and allow to do other operations, but have not had time. It would be great if someone can help tackle this.

@culebron
Copy link
Author

culebron commented Mar 21, 2018

I've started switching read and write operations to rasterio, hoping to finish this week. But some operations are still heavily using GDAL, so I need some assistance.

One thing that I noticed is that in this code, only one band is read and written, while rasterio always works with mutliple.

@culebron
Copy link
Author

Reading more carefully, I see there are few of them.

@ozak
Copy link
Owner

ozak commented Mar 21, 2018

I have to look more carefully but I think the only other function that uses gdal is the get_geo_info function. But I imagine rasterio has similar utilities as the ones used there(?).

@culebron
Copy link
Author

Yes, it does. I found all the attributes that you use to instantiate GeoRaster. The only my concern is that types are capitalized in one library, and not in the other ('int32' vs 'Int32')

@ozak
Copy link
Owner

ozak commented Oct 9, 2019

I never heard back from you and now I am not sure if you were expecting an answer to your last comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants