Open hawahee opened 1 week ago
Thanks for reporting! Interesting that ArchGDAL doesn't write the aux file.
I'd have to check if not setting some spatial information writes only the png. Then again, this whole library is for spatial information. I was thinking about always writing a crs (local engineering crs if none was provided), which wouldn't help here.
Can I ask what your use case is here? Do you just want to write png from an array, or is there an (unknown) spatial component?
Looking into a bit, it seems controlled by metadata options such as https://gdal.org/en/latest/user/configoptions.html#persistent-auxiliary-metadata-pam-options. I can't reproduce this on macos, but it seems on windows and linux it does write metadata.
Could you try to run GeoArrays.ArchGDAL.setconfigoption("GDAL_PAM_ENABLED","NO")
and then see whether the .png is created or not?
Can I ask what your use case is here? Do you just want to write png from an array, or is there an (unknown) spatial component?
Yes, I just want to write a png from an array. I sometimes have a RGB image with a spatial component and just want to remove the spatial component and save it. I could use a different library for that, but it was easier for me to also use the GeoArrays library for that.
Could you try to run
GeoArrays.ArchGDAL.setconfigoption("GDAL_PAM_ENABLED","NO")
and then see whether the .png is created or not?
That did stop the write from creating the .aux.xml
file.
When exporting an image with an undefined coordinate reference system using
GeoArrays.write("output.png", ga)
an unnecessaryoutput.png.aux.xml
file is created that contains the following:Can the write method be changed to not write such unnecessary files when there is no defined CRS?
Using ArchGDAL instead of GeoArrays does not produce the
.aux.xml
file.Steps to reproduce: