Add GeoTiff and ARC/INFO ASCII GRID exporter for shakemap (as raster)
For integration in the EarthExplorer platform (amongst other users) exporters are needed to write the shakemaps into common geospatial data formats for visualisation. Two formats should be considered initially:
-
GeoTiff - The common and compact standard for single band raster data
-
ARC/INFO ASCII GRID - Relatively simple text format recognised by all major GIS platforms. Easy to build using numpy alone, though less compact than GeoTiff.
For handling GeoTiff formats I usually use rasterio
(https://rasterio.readthedocs.io/en/latest/), which brings few dependencies and is easy to install and run. It can read and write most common raster formats. Another option is to use the Python GDAL bindings (https://pypi.org/project/GDAL/). This is a more powerful tool and would potentially open up the possibility to write to a wider variety of raster formats in the future. However, it creates a dependency on GDAL, which in my experience has been extremely challenging to run on a lot of platforms (I have only ever had bad experiences getting it to work cleanly, if at all, on OSX, and run into problems on both Windows and Linux).
@marius @rizac @nils @eggi Any suggestions on the most suitable Python tools for building rasters?