jgrss / geowombat

GeoWombat: Utilities for geospatial data
https://geowombat.readthedocs.io
MIT License
182 stars 10 forks source link

jgrss/warp cleanup #306

Closed jgrss closed 3 months ago

jgrss commented 3 months ago

What is this PR changing?

jgrss commented 3 months ago

@mmann1123 if you have time, could you test this branch out with some of your data?

mmann1123 commented 3 months ago

Sure

mmann1123 commented 3 months ago

resolves #309

jgrss commented 3 months ago

@mmann1123 I added a few more tests, which exposed a bug in to_raster(). Previously, the nodata value was not properly saved when using to_raster(). I commented on the fix in io.py.

jgrss commented 3 months ago

@mmann1123 I made bigtiff a keyword argument, with a default of None. You should be able to pass data.gw.save(..., bigtiff='IF_SAFER'). Let me know if that doesn't work.

mmann1123 commented 3 months ago

@mmann1123 I made bigtiff a keyword argument, with a default of None. You should be able to pass data.gw.save(..., bigtiff='IF_SAFER'). Let me know if that doesn't work.

That works.

jgrss commented 3 months ago

I think the issues i was having had to do with hitting memory limits, mosaicing huge 18 band images must have been bonking it. I've tried to recreate the issues on reasonably large datasets and haven't had the same issue. I think this is working well for almost all purposes.

Were you referring to this?

There's an issue here trying it out on my files and I'm seeing empty rasters after mosaicing. Unfortunately I need to sign off and can't dig into why

jgrss commented 3 months ago

We can postpone this merge if you want to diagnose the large raster mosaicking. Is the file too large to upload and share?

mmann1123 commented 3 months ago

I think we merge this, but we can open a large mosaic issue. I was able to resolve my issue using da.maximum() Maybe it is possible I was triggering compute or persist.