ruithnadsteud / yt_georaster

A package for handling geotiff files and georeferenced datasets within yt.
1 stars 2 forks source link

Field Map now optional and extension warning in `save_as_geotiff` #60

Closed deastwoo closed 2 years ago

deastwoo commented 2 years ago

We were needing to save our geotiffs without an extension and without a field map so I have made a couple of changes to allow this as an option.

Now if you try to save to a geotiff with a file name without an extension it will just warn you it doesn’t recognise the extension. It will also not save a field map if it doesn’t recognise the extension - just to avoid the yaml field ending up in weird places.

Also I’ve added save_fmap as an option to save_as_geotiff. It defaults to True but I thought that was the best way to not break anything else at the moment. It is as simple as adding the kwarg save_fmap=False to the call to save_as_geotiff to suppress the creation of the field map yaml file.