Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I had that same frustration this week. Trying to generate geotiffs from arrays in Python. I found four libraries, all of which just wrap GDAL, all of which have the same quirky issues. Alas. :)



If you have a 1:1 mapping between array cells and pixels (no geographic transformations), just use any image format as intermediate. But I am interested what quirky issues you encountered. I found rasterio very nice to work with using numpy arrays.


Super obscure issues. When I try to use GDAL to build a geotiff from a bumpy array I get an underlying c++ crash of some sort. I'm not an expert. But it happens only when I try to do it within QGIS. It's something about the compatibility of numpy and gdals underlying c++ APIs.

I wish I was smarter and could debug further. Issue doesn't happen standalone but happens in a qt5 plugin for GDAL. I was hoping to find any other implementation of array to tiff in order to avoid this crash. Alas.


Is it possible to create a small test case that removes any proprietary data so it can be sent as a bug report?


Could you share code and data for a minimal crashing example? This sounds like the developers would be glad to fix it. Both GDAL and QGIS have very active devs.


tried this outside of QGIS? pip install rasterio, etc.

We heavily use GDAL/rasterio/numpy at work with no real problems.


Everything works outside QGIS. There's just something about the environment. I have 7 lines of code that crashes my QGIS every time.


Please share those for investigation!


You're a genuis to me. Didn’t know any of this. Good luck.


Is there a place, like Groklaw's UNIX timeline, where you can see which software is derived from what?




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: