project-icp / bee-pollinator-app

The web application front end for the ICP Pollinator Decision Support Tool 🐝
Apache License 2.0
6 stars 1 forks source link

Evaluate test rasters provided by UMN #585

Closed mmcfarland closed 4 years ago

mmcfarland commented 4 years ago

UMN uploaded several rasters to our Dropbox account and are asking for feedback concerning these attributes:

Rasters:

Evaluate and respond before the national production set it produced.

mmcfarland commented 4 years ago

I reviewed the files and followed up with the author with the following message:


The app relies on some filename conventions, is it possible to conform to the following template:

Zero as NoData is ok for us, but is 0 also a valid value? If it’s not, there isn’t a problem using it. However, can you add the NoData tag to the tif files? The sample files don’t have 0 set as the nodata value, and since the envelopes around the different states overlap, we can only “drill down” into the correct raster if the covering no data values are actually marked as no data in the tif. I’m not sure what software you’re using, but you could use gdal_translate to set them like this:

gdal_translate -a_nodata 0 old_name new_name

There’s a bit of noisy values in the lakes that bound some of the states. They have very low values (7.66429e-5). This won’t be disruptive except if someone tried to click in the lake, they might get these values as indicator values.

image

The files look like they are processed at 1.5 and 2.5km radius. The previous data and the app are using 3km and 5km. Is this an intentional change? We will have to make updates to the app if so.

I reformatted the files to try to reduce the file size, and I had some luck with different compression algorithms and geotiff settings. For example, I got the sample TX raster down to about 1.3GB, nearly 50% reduction. The other rasters saw similar reductions. The settings are:

TILED=YES COMPRESSION=DEFLATE PREDICTOR=3 NODATA=0

An example gdal command I used is below, but you may be able to set these when generating the rasters with whatever software you use.

gdal_translate -a_nodata 0 -co "COMPRESS=DEFLATE" -co "PREDICTOR=3" -co "TILED=YES" Texasspring1500_2019.tif TX_floral_spring_1500m.tif