diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8abd6066..35edd08a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,15 @@ versioning. Rather than a static releases, this repository contains of a number
of regression tests that are each semi-independent. This CHANGELOG file should be used
to document pull requests to this repository.
+## 2024-10-16 ([#105](https://github.com/nasa/harmony-regression-tests/pull/105))
+
+- Updates the HyBIG regression test suite to include a test specifying a variable
+ in the request. This will ensure Harmony passes UMM-Var metadata to HyBIG and
+ therefore allow HyBIG to use a custom colour map for the generated browse
+ imagery.
+- The comparisons within the HyBIG regression test suite also now derive their
+ CRS and geotransform metadata from the `.aux.xml` file for each browse image.
+
## 2024-10-11 ([#104](https://github.com/nasa/harmony-regression-tests/pull/104))
- Migrates trajectory-subsetter to use `shared_utils`.
diff --git a/test/hybig/HyBIG_Regression.ipynb b/test/hybig/HyBIG_Regression.ipynb
index f5630a63..feaab4b0 100644
--- a/test/hybig/HyBIG_Regression.ipynb
+++ b/test/hybig/HyBIG_Regression.ipynb
@@ -13,6 +13,8 @@
"\n",
"These tests use MEaSUREs Vegetation Continuous Fields (VCF) Yearly Global 0.05 Deg V001 ([VCF5KYR](https://cmr.uat.earthdata.nasa.gov/search/concepts/C1258119317-EEDTEST)) as GeoTIFF input data to test the HyBIG service against RGB color banded input.\n",
"\n",
+ "Tests that make comparisons between reference files and the generated test output will compare the array values of the generated PNGs or JPEGs, and also the metadata that `rasterio` retrieves for the file. Some of this metadata is retrieved from the PNG or JPEG itself, such as array dimensions, whilst information such as the CRS and geotransform are retrieved by the accompanying `aux.xml` file that HyBIG also creates for each browse image.\n",
+ "\n",
"## Set the Harmony environment:\n",
"\n",
"The cell below sets the `harmony_host_url` to one of the following valid values:\n",
@@ -112,27 +114,36 @@
"non_production_collection = {\n",
" 'aster_collection': Collection(id='C1256584478-EEDTEST'),\n",
" 'measures_collection': Collection(id='C1258119317-EEDTEST'),\n",
+ " 'prefire_collection': Collection(id='C1263096190-EEDTEST'),\n",
"}\n",
"\n",
"non_prod_granule_data = {\n",
" 'aster_granules': ['G1256584570-EEDTEST'],\n",
" 'measures_granules': ['G1258119387-EEDTEST'],\n",
+ " 'prefire_granules': ['G1263096192-EEDTEST'],\n",
+ "}\n",
+ "\n",
+ "non_prod_variable_data = {\n",
+ " 'prefire_variable': 'Flx/olr',\n",
"}\n",
"\n",
"collection_data = {\n",
" 'https://harmony.uat.earthdata.nasa.gov': {\n",
" **non_production_collection,\n",
" **non_prod_granule_data,\n",
+ " **non_prod_variable_data,\n",
" 'env': Environment.UAT,\n",
" },\n",
" 'https://harmony.sit.earthdata.nasa.gov': {\n",
" **non_production_collection,\n",
" **non_prod_granule_data,\n",
+ " **non_prod_variable_data,\n",
" 'env': Environment.SIT,\n",
" },\n",
" 'http://localhost:3000': {\n",
" **non_production_collection,\n",
" **non_prod_granule_data,\n",
+ " **non_prod_variable_data,\n",
" 'env': Environment.LOCAL,\n",
" },\n",
"}\n",
@@ -186,7 +197,7 @@
"The output from this test should be constrained to the specified area, in this case that of the ASTER tile, which has approximately the following extent:\n",
"\n",
"* 22 ≤ longitude (degrees east) ≤ 23\n",
- "* 0 ≤ latitude (degrees north) ≤ 1\n"
+ "* 0 ≤ latitude (degrees north) ≤ 1"
]
},
{
@@ -221,20 +232,14 @@
" )\n",
" ]\n",
"\n",
- " test_files = build_file_list(aster_basename, Path(temp_dir), 'PNG')\n",
- " for file_name in test_files:\n",
+ " test_result_files = build_file_list(aster_basename, Path(temp_dir), 'PNG')\n",
+ "\n",
+ " for file_name in test_result_files:\n",
" assert file_name.exists(), f'File does not exist {file_name.resolve()}'\n",
" print_success('all test files generated')\n",
"\n",
- " expected_output_metadata = {\n",
- " **common_aster_metadata,\n",
- " 'driver': 'PNG',\n",
- " 'count': 1,\n",
- " 'nodata': 255,\n",
- " }\n",
- "\n",
" assert_dataset_produced_correct_results(\n",
- " test_files[0], expected_output_metadata, reference_files[0], 'PNG'\n",
+ " test_result_files[0], reference_files[0], 'PNG'\n",
" )\n",
"\n",
" print_success('Conversion of ASTER Geotiff to PNG Success')\n",
@@ -284,19 +289,13 @@
" )\n",
" ]\n",
"\n",
- " test_files = build_file_list(aster_basename, Path(temp_dir), 'JPEG')\n",
- " for file_name in test_files:\n",
+ " test_result_files = build_file_list(aster_basename, Path(temp_dir), 'JPEG')\n",
+ " for file_name in test_result_files:\n",
" assert file_name.exists(), f'File does not exist {file_name.resolve()}'\n",
" print_success('all test files generated')\n",
"\n",
- " expected_output_metadata = {\n",
- " 'driver': 'JPEG',\n",
- " **common_aster_metadata,\n",
- " 'count': 3,\n",
- " }\n",
- "\n",
" assert_dataset_produced_correct_results(\n",
- " test_files[0], expected_output_metadata, reference_files[0], 'JPEG'\n",
+ " test_result_files[0], reference_files[0], 'JPEG'\n",
" )\n",
"\n",
" print_success('Conversion of ASTER Geotiff to JPEG Success')\n",
@@ -460,20 +459,14 @@
" )\n",
" ]\n",
"\n",
- " test_files = build_file_list(measures_basename, Path(temp_dir), 'PNG')\n",
- " for file_name in test_files:\n",
+ " test_result_files = build_file_list(measures_basename, Path(temp_dir), 'PNG')\n",
+ " for file_name in test_result_files:\n",
" assert file_name.exists(), f'File does not exist {file_name.resolve()}'\n",
"\n",
" print_success('all test files generated')\n",
"\n",
- " expected_output_metadata = {\n",
- " **common_measures_metadata,\n",
- " 'driver': 'PNG',\n",
- " 'count': 1,\n",
- " }\n",
- "\n",
" assert_dataset_produced_correct_results(\n",
- " test_files[0], expected_output_metadata, reference_files[0], 'PNG'\n",
+ " test_result_files[0], reference_files[0], 'PNG'\n",
" )\n",
"\n",
" print_success('Conversion of MEaSUREs GeoTIFF to PNG Success')\n",
@@ -518,20 +511,15 @@
" )\n",
" ]\n",
"\n",
- " test_files = build_file_list(measures_basename, Path(temp_dir), 'JPG')\n",
- " for file_name in test_files:\n",
+ " test_result_files = build_file_list(measures_basename, Path(temp_dir), 'JPG')\n",
+ "\n",
+ " for file_name in test_result_files:\n",
" assert file_name.exists(), f'File does not exist {file_name.resolve()}'\n",
- " print_success('all test files generated')\n",
"\n",
- " expected_output_metadata = {\n",
- " **common_measures_metadata,\n",
- " 'driver': 'JPEG',\n",
- " 'count': 3,\n",
- " 'nodata': None,\n",
- " }\n",
+ " print_success('all test files generated')\n",
"\n",
" assert_dataset_produced_correct_results(\n",
- " test_files[0], expected_output_metadata, reference_files[0], 'JPEG'\n",
+ " test_result_files[0], reference_files[0], 'JPEG'\n",
" )\n",
"\n",
" print_success('Conversion of MEaSUREs Geotiff to JPEG Success')\n",
@@ -587,24 +575,15 @@
" )\n",
" ]\n",
"\n",
- " test_files = build_file_list(measures_basename, Path(temp_dir), 'PNG')\n",
+ " test_result_files = build_file_list(measures_basename, Path(temp_dir), 'PNG')\n",
"\n",
- " for file_name in test_files:\n",
+ " for file_name in test_result_files:\n",
" assert file_name.exists(), f'File does not exist {file_name.resolve()}'\n",
"\n",
" print_success('all test files generated')\n",
"\n",
- " expected_output_metadata = {\n",
- " **common_measures_metadata,\n",
- " 'driver': 'PNG',\n",
- " 'count': 1,\n",
- " 'transform': Affine(1.0, 0.0, -180.0, 0.0, -2.0, 90.0),\n",
- " 'height': 90,\n",
- " 'width': 360,\n",
- " }\n",
- "\n",
" assert_dataset_produced_correct_results(\n",
- " test_files[0], expected_output_metadata, reference_files[0], 'PNG'\n",
+ " test_result_files[0], reference_files[0], 'PNG'\n",
" )\n",
"\n",
" print_success('Conversion of MEaSUREs GeoTIFF to PNG specifying scaleSize. Success')\n",
@@ -655,24 +634,15 @@
" )\n",
" ]\n",
"\n",
- " test_files = build_file_list(measures_basename, Path(temp_dir), 'PNG')\n",
+ " test_result_files = build_file_list(measures_basename, Path(temp_dir), 'PNG')\n",
"\n",
- " for file_name in test_files:\n",
+ " for file_name in test_result_files:\n",
" assert file_name.exists(), f'File does not exist {file_name.resolve()}'\n",
"\n",
" print_success('all test files generated')\n",
"\n",
- " expected_output_metadata = {\n",
- " **common_measures_metadata,\n",
- " 'driver': 'PNG',\n",
- " 'count': 1,\n",
- " 'transform': Affine(2.0, 0.0, -180.0, 0.0, -1.0, 90.0),\n",
- " 'height': 180,\n",
- " 'width': 180,\n",
- " }\n",
- "\n",
" assert_dataset_produced_correct_results(\n",
- " test_files[0], expected_output_metadata, reference_files[0], 'PNG'\n",
+ " test_result_files[0], reference_files[0], 'PNG'\n",
" )\n",
"\n",
" print_success(\n",
@@ -738,6 +708,14 @@
"outputs": [],
"source": [
"if environment_information is not None:\n",
+ " iceland_tiles = [\n",
+ " f'{measures_basename}.r00c00',\n",
+ " f'{measures_basename}.r00c01',\n",
+ " f'{measures_basename}.r00c02',\n",
+ " f'{measures_basename}.r00c03',\n",
+ " f'{measures_basename}.r00c04',\n",
+ " ]\n",
+ "\n",
" iceland_extent = [-30, 60, -10, 70]\n",
" iceland_scale_size = [0.001, 0.0029]\n",
" tiled_reference_dir = reference_dir / 'tiled'\n",
@@ -754,51 +732,6 @@
" tiled_job_id = harmony_client.submit(tiled_request)\n",
" harmony_client.wait_for_processing(tiled_job_id, show_progress=True)\n",
"\n",
- " # Define the tile information, so the output for each tile can be tested:\n",
- " tile_0_basename = f'{measures_basename}.r00c00'\n",
- " tile_1_basename = f'{measures_basename}.r00c01'\n",
- " tile_2_basename = f'{measures_basename}.r00c02'\n",
- " tile_3_basename = f'{measures_basename}.r00c03'\n",
- " tile_4_basename = f'{measures_basename}.r00c04'\n",
- "\n",
- " common_output_metadata = {\n",
- " **common_measures_metadata,\n",
- " 'driver': 'PNG',\n",
- " 'count': 1,\n",
- " 'height': 3448,\n",
- " 'width': 4096,\n",
- " }\n",
- "\n",
- " expected_tile_0_metadata = {\n",
- " **common_output_metadata,\n",
- " 'transform': Affine(0.001, 0.0, -30.0, 0.0, -0.002900232018561485, 70.0),\n",
- " }\n",
- " expected_tile_1_metadata = {\n",
- " **common_output_metadata,\n",
- " 'transform': Affine(0.001, 0.0, -25.904, 0.0, -0.002900232018561485, 70.0),\n",
- " }\n",
- " expected_tile_2_metadata = {\n",
- " **common_output_metadata,\n",
- " 'transform': Affine(0.001, 0.0, -21.808, 0.0, -0.002900232018561485, 70.0),\n",
- " }\n",
- " expected_tile_3_metadata = {\n",
- " **common_output_metadata,\n",
- " 'transform': Affine(0.001, 0.0, -17.712, 0.0, -0.002900232018561485, 70.0),\n",
- " }\n",
- " expected_tile_4_metadata = {\n",
- " **common_output_metadata,\n",
- " 'transform': Affine(0.001, 0.0, -13.616, 0.0, -0.002900232018561485, 70.0),\n",
- " 'width': 3616,\n",
- " }\n",
- "\n",
- " tile_information = [\n",
- " (tile_0_basename, expected_tile_0_metadata),\n",
- " (tile_1_basename, expected_tile_1_metadata),\n",
- " (tile_2_basename, expected_tile_2_metadata),\n",
- " (tile_3_basename, expected_tile_3_metadata),\n",
- " (tile_4_basename, expected_tile_4_metadata),\n",
- " ]\n",
- "\n",
" with TemporaryDirectory() as temp_dir:\n",
" downloaded_tiled_outputs = [\n",
" file_future.result()\n",
@@ -807,23 +740,110 @@
" )\n",
" ]\n",
"\n",
- " # Perform the same checks for both tiles:\n",
- " for tile_basename, expected_tile_metadata in tile_information:\n",
- " tile_files = build_file_list(tile_basename, tiled_reference_dir, 'PNG')\n",
- " tile_test_files = build_file_list(tile_basename, Path(temp_dir), 'PNG')\n",
+ " # Perform the same checks for all tiles:\n",
+ " for tile_basename in iceland_tiles:\n",
+ " tile_reference_files = build_file_list(\n",
+ " tile_basename, tiled_reference_dir, 'PNG'\n",
+ " )\n",
+ " tile_result_files = build_file_list(tile_basename, Path(temp_dir), 'PNG')\n",
"\n",
- " for file_name in tile_test_files:\n",
+ " for file_name in tile_result_files:\n",
" assert file_name.exists(), f'File does not exist {file_name.resolve()}'\n",
"\n",
" print_success(f'All {tile_basename} test files generated')\n",
+ "\n",
" assert_dataset_produced_correct_results(\n",
- " tile_test_files[0], expected_tile_metadata, tile_files[0], 'PNG'\n",
+ " tile_result_files[0], tile_reference_files[0], 'PNG'\n",
" )\n",
"\n",
" print_success('Conversion of MEaSUREs GeoTIFF to tiled PNGs. Success')\n",
"else:\n",
" print('Skipping test: HyBIG regression tests not configured for this environment.')"
]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "c567bc0e",
+ "metadata": {},
+ "source": [
+ "### Test that demonstrates variable selection for custom colour maps:\n",
+ "\n",
+ "This test will run a request that specifies a variable for HyBIG to use. It is a bit of a quirky way to ensure HyBIG has access to the related URL for a custom colour map. The output should be in colour rather than greyscale.\n",
+ "\n",
+ "PREFIRE granules also cover the whole Earth at sufficient resolution such that HyBIG will create tiled output, so there will be 15 tiles generated (3 rows, 5 columns).\n",
+ "\n",
+ "This test primarily seeks to ensure the values in the output images use the colour map specified in the related URLs of the specified [UMM-Var record](https://cmr.uat.earthdata.nasa.gov/search/variables.umm_json?concept_id=V1270130943-LARC_CLOUD)."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "980a401b",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "if environment_information is not None:\n",
+ " prefire_basename = 'PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00'\n",
+ "\n",
+ " prefire_tiles = [\n",
+ " f'{prefire_basename}.r00c00',\n",
+ " f'{prefire_basename}.r00c01',\n",
+ " f'{prefire_basename}.r00c02',\n",
+ " f'{prefire_basename}.r00c03',\n",
+ " f'{prefire_basename}.r00c04',\n",
+ " f'{prefire_basename}.r01c00',\n",
+ " f'{prefire_basename}.r01c01',\n",
+ " f'{prefire_basename}.r01c02',\n",
+ " f'{prefire_basename}.r01c03',\n",
+ " f'{prefire_basename}.r01c04',\n",
+ " f'{prefire_basename}.r02c00',\n",
+ " f'{prefire_basename}.r02c01',\n",
+ " f'{prefire_basename}.r02c02',\n",
+ " f'{prefire_basename}.r02c03',\n",
+ " f'{prefire_basename}.r02c04',\n",
+ " ]\n",
+ "\n",
+ " colour_map_reference_dir = reference_dir / 'colour_map'\n",
+ "\n",
+ " colour_map_request = Request(\n",
+ " collection=environment_information['prefire_collection'],\n",
+ " granule_id=environment_information['prefire_granules'][0],\n",
+ " variables=[environment_information['prefire_variable']],\n",
+ " format='image/png',\n",
+ " )\n",
+ "\n",
+ " colour_map_job_id = harmony_client.submit(colour_map_request)\n",
+ " harmony_client.wait_for_processing(colour_map_job_id, show_progress=True)\n",
+ "\n",
+ " with TemporaryDirectory() as temp_dir:\n",
+ " downloaded_colour_map_outputs = [\n",
+ " file_future.result()\n",
+ " for file_future in harmony_client.download_all(\n",
+ " colour_map_job_id, overwrite=True, directory=temp_dir\n",
+ " )\n",
+ " ]\n",
+ "\n",
+ " for tile_basename in prefire_tiles:\n",
+ " tile_reference_files = build_file_list(\n",
+ " tile_basename, colour_map_reference_dir, 'PNG'\n",
+ " )\n",
+ " tile_result_files = build_file_list(tile_basename, Path(temp_dir), 'PNG')\n",
+ "\n",
+ " for file_name in tile_result_files:\n",
+ " assert file_name.exists(), f'File does not exist {file_name.resolve()}'\n",
+ "\n",
+ " print_success(f'All {tile_basename} test files generated')\n",
+ "\n",
+ " assert_dataset_produced_correct_results(\n",
+ " tile_result_files[0], tile_reference_files[0], 'PNG'\n",
+ " )\n",
+ "\n",
+ " print_success(\n",
+ " 'Conversion of PREFIRE GeoTIFF to PNG using custom colour map. Success'\n",
+ " )\n",
+ "else:\n",
+ " print('Skipping test: HyBIG regression tests not configured for this environment.')"
+ ]
}
],
"metadata": {
@@ -843,7 +863,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.10.9"
+ "version": "3.11.9"
}
},
"nbformat": 4,
diff --git a/test/hybig/reference_data/ASTGTMV003_N00E022_dem.txt b/test/hybig/reference_data/ASTGTMV003_N00E022_dem.txt
deleted file mode 100644
index ada1af99..00000000
--- a/test/hybig/reference_data/ASTGTMV003_N00E022_dem.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-0.00027464982147761604
-0.0
-0.0
--0.00027464982147761604
-22.00013732491074
-0.9998626750892612
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c00.pgw b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c00.pgw
new file mode 100644
index 00000000..70640e2c
--- /dev/null
+++ b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c00.pgw
@@ -0,0 +1,6 @@
+0.01956840788987115
+0.0
+0.0
+-0.01956734427383191
+-179.9902157710348
+89.99021631535295
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c00.png b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c00.png
new file mode 100644
index 00000000..f1f15f43
Binary files /dev/null and b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c00.png differ
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c00.png.aux.xml b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c00.png.aux.xml
new file mode 100644
index 00000000..b31d585a
--- /dev/null
+++ b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c00.png.aux.xml
@@ -0,0 +1,14 @@
+
+ GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]
+ -1.7999999997497974e+02, 1.9568407889871148e-02, 0.0000000000000000e+00, 8.9999999987489872e+01, 0.0000000000000000e+00, -1.9567344273831909e-02
+
+
+ YES
+ 254
+ 254
+ 254
+ 0
+ 100
+
+
+
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c01.pgw b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c01.pgw
new file mode 100644
index 00000000..43a9370b
--- /dev/null
+++ b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c01.pgw
@@ -0,0 +1,6 @@
+0.01956840788987115
+0.0
+0.0
+-0.01956734427383191
+-99.83801705412259
+89.99021631535295
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c01.png b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c01.png
new file mode 100644
index 00000000..20d2615d
Binary files /dev/null and b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c01.png differ
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c01.png.aux.xml b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c01.png.aux.xml
new file mode 100644
index 00000000..355ebd6e
--- /dev/null
+++ b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c01.png.aux.xml
@@ -0,0 +1,14 @@
+
+ GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]
+ -9.9847801258067520e+01, 1.9568407889871148e-02, 0.0000000000000000e+00, 8.9999999987489872e+01, 0.0000000000000000e+00, -1.9567344273831909e-02
+
+
+ YES
+ 254
+ 249.89323425293
+ 9
+ 27.489592912717
+ 100
+
+
+
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c02.pgw b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c02.pgw
new file mode 100644
index 00000000..f7e78cd0
--- /dev/null
+++ b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c02.pgw
@@ -0,0 +1,6 @@
+0.01956840788987115
+0.0
+0.0
+-0.01956734427383191
+-19.68581833721036
+89.99021631535295
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c02.png b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c02.png
new file mode 100644
index 00000000..bdc6b734
Binary files /dev/null and b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c02.png differ
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c02.png.aux.xml b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c02.png.aux.xml
new file mode 100644
index 00000000..402c1f94
--- /dev/null
+++ b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c02.png.aux.xml
@@ -0,0 +1,14 @@
+
+ GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]
+ -1.9695602541155296e+01, 1.9568407889871148e-02, 0.0000000000000000e+00, 8.9999999987489872e+01, 0.0000000000000000e+00, -1.9567344273831909e-02
+
+
+ YES
+ 254
+ 251.89521026611
+ 66
+ 19.013916282497
+ 100
+
+
+
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c03.pgw b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c03.pgw
new file mode 100644
index 00000000..d37c7a71
--- /dev/null
+++ b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c03.pgw
@@ -0,0 +1,6 @@
+0.01956840788987115
+0.0
+0.0
+-0.01956734427383191
+60.46638037970188
+89.99021631535295
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c03.png b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c03.png
new file mode 100644
index 00000000..e7e215ac
Binary files /dev/null and b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c03.png differ
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c03.png.aux.xml b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c03.png.aux.xml
new file mode 100644
index 00000000..f502e687
--- /dev/null
+++ b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c03.png.aux.xml
@@ -0,0 +1,14 @@
+
+ GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]
+ 6.0456596175756943e+01, 1.9568407889871148e-02, 0.0000000000000000e+00, 8.9999999987489872e+01, 0.0000000000000000e+00, -1.9567344273831909e-02
+
+
+ YES
+ 254
+ 250.98323440552
+ 2
+ 24.256568673074
+ 100
+
+
+
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c04.pgw b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c04.pgw
new file mode 100644
index 00000000..7532c91d
--- /dev/null
+++ b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c04.pgw
@@ -0,0 +1,6 @@
+0.01956840788987115
+0.0
+0.0
+-0.01956734427383191
+140.6185790966141
+89.99021631535295
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c04.png b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c04.png
new file mode 100644
index 00000000..724fb6a8
Binary files /dev/null and b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c04.png differ
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c04.png.aux.xml b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c04.png.aux.xml
new file mode 100644
index 00000000..0b83dde7
--- /dev/null
+++ b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r00c04.png.aux.xml
@@ -0,0 +1,14 @@
+
+ GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]
+ 1.4060879489266915e+02, 1.9568407889871148e-02, 0.0000000000000000e+00, 8.9999999987489872e+01, 0.0000000000000000e+00, -1.9567344273831909e-02
+
+
+ YES
+ 254
+ 254
+ 254
+ 0
+ 100
+
+
+
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c00.pgw b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c00.pgw
new file mode 100644
index 00000000..7288fbaa
--- /dev/null
+++ b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c00.pgw
@@ -0,0 +1,6 @@
+0.01956840788987115
+0.0
+0.0
+-0.01956734427383191
+-179.9902157710348
+9.842374169737457
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c00.png b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c00.png
new file mode 100644
index 00000000..2ee7bfa3
Binary files /dev/null and b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c00.png differ
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c00.png.aux.xml b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c00.png.aux.xml
new file mode 100644
index 00000000..b7a2af56
--- /dev/null
+++ b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c00.png.aux.xml
@@ -0,0 +1,14 @@
+
+ GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]
+ -1.7999999997497974e+02, 1.9568407889871148e-02, 0.0000000000000000e+00, 9.8521578418743729e+00, 0.0000000000000000e+00, -1.9567344273831909e-02
+
+
+ YES
+ 254
+ 252.31397247314
+ 24
+ 16.958411809499
+ 100
+
+
+
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c01.pgw b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c01.pgw
new file mode 100644
index 00000000..e82e287b
--- /dev/null
+++ b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c01.pgw
@@ -0,0 +1,6 @@
+0.01956840788987115
+0.0
+0.0
+-0.01956734427383191
+-99.83801705412259
+9.842374169737457
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c01.png b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c01.png
new file mode 100644
index 00000000..cfcf98c7
Binary files /dev/null and b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c01.png differ
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c01.png.aux.xml b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c01.png.aux.xml
new file mode 100644
index 00000000..c4f2da2d
--- /dev/null
+++ b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c01.png.aux.xml
@@ -0,0 +1,4 @@
+
+ GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]
+ -9.9847801258067520e+01, 1.9568407889871148e-02, 0.0000000000000000e+00, 9.8521578418743729e+00, 0.0000000000000000e+00, -1.9567344273831909e-02
+
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c02.pgw b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c02.pgw
new file mode 100644
index 00000000..bb6087cd
--- /dev/null
+++ b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c02.pgw
@@ -0,0 +1,6 @@
+0.01956840788987115
+0.0
+0.0
+-0.01956734427383191
+-19.68581833721036
+9.842374169737457
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c02.png b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c02.png
new file mode 100644
index 00000000..f1f15f43
Binary files /dev/null and b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c02.png differ
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c02.png.aux.xml b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c02.png.aux.xml
new file mode 100644
index 00000000..4dff47f2
--- /dev/null
+++ b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c02.png.aux.xml
@@ -0,0 +1,4 @@
+
+ GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]
+ -1.9695602541155296e+01, 1.9568407889871148e-02, 0.0000000000000000e+00, 9.8521578418743729e+00, 0.0000000000000000e+00, -1.9567344273831909e-02
+
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c03.pgw b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c03.pgw
new file mode 100644
index 00000000..186848c8
--- /dev/null
+++ b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c03.pgw
@@ -0,0 +1,6 @@
+0.01956840788987115
+0.0
+0.0
+-0.01956734427383191
+60.46638037970188
+9.842374169737457
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c03.png b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c03.png
new file mode 100644
index 00000000..edcd0c9b
Binary files /dev/null and b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c03.png differ
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c03.png.aux.xml b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c03.png.aux.xml
new file mode 100644
index 00000000..42903065
--- /dev/null
+++ b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c03.png.aux.xml
@@ -0,0 +1,4 @@
+
+ GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]
+ 6.0456596175756943e+01, 1.9568407889871148e-02, 0.0000000000000000e+00, 9.8521578418743729e+00, 0.0000000000000000e+00, -1.9567344273831909e-02
+
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c04.pgw b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c04.pgw
new file mode 100644
index 00000000..b72b1296
--- /dev/null
+++ b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c04.pgw
@@ -0,0 +1,6 @@
+0.01956840788987115
+0.0
+0.0
+-0.01956734427383191
+140.6185790966141
+9.842374169737457
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c04.png b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c04.png
new file mode 100644
index 00000000..724fb6a8
Binary files /dev/null and b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c04.png differ
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c04.png.aux.xml b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c04.png.aux.xml
new file mode 100644
index 00000000..c9d599fe
--- /dev/null
+++ b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r01c04.png.aux.xml
@@ -0,0 +1,14 @@
+
+ GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]
+ 1.4060879489266915e+02, 1.9568407889871148e-02, 0.0000000000000000e+00, 9.8521578418743729e+00, 0.0000000000000000e+00, -1.9567344273831909e-02
+
+
+ YES
+ 254
+ 254
+ 254
+ 0
+ 100
+
+
+
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c00.pgw b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c00.pgw
new file mode 100644
index 00000000..5fc43814
--- /dev/null
+++ b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c00.pgw
@@ -0,0 +1,6 @@
+0.01956840788987115
+0.0
+0.0
+-0.01956734427383191
+-179.9902157710348
+-70.30546797587805
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c00.png b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c00.png
new file mode 100644
index 00000000..334d609b
Binary files /dev/null and b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c00.png differ
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c00.png.aux.xml b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c00.png.aux.xml
new file mode 100644
index 00000000..3dd15352
--- /dev/null
+++ b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c00.png.aux.xml
@@ -0,0 +1,14 @@
+
+ GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]
+ -1.7999999997497974e+02, 1.9568407889871148e-02, 0.0000000000000000e+00, -7.0295684303741126e+01, 0.0000000000000000e+00, -1.9567344273831909e-02
+
+
+ YES
+ 254
+ 247.69058504972
+ 117
+ 27.832085579563
+ 100
+
+
+
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c01.pgw b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c01.pgw
new file mode 100644
index 00000000..62c46379
--- /dev/null
+++ b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c01.pgw
@@ -0,0 +1,6 @@
+0.01956840788987115
+0.0
+0.0
+-0.01956734427383191
+-99.83801705412259
+-70.30546797587805
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c01.png b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c01.png
new file mode 100644
index 00000000..a944842c
Binary files /dev/null and b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c01.png differ
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c01.png.aux.xml b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c01.png.aux.xml
new file mode 100644
index 00000000..8e3b36b4
--- /dev/null
+++ b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c01.png.aux.xml
@@ -0,0 +1,4 @@
+
+ GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]
+ -9.9847801258067520e+01, 1.9568407889871148e-02, 0.0000000000000000e+00, -7.0295684303741126e+01, 0.0000000000000000e+00, -1.9567344273831909e-02
+
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c02.pgw b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c02.pgw
new file mode 100644
index 00000000..e2c05701
--- /dev/null
+++ b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c02.pgw
@@ -0,0 +1,6 @@
+0.01956840788987115
+0.0
+0.0
+-0.01956734427383191
+-19.68581833721036
+-70.30546797587805
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c02.png b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c02.png
new file mode 100644
index 00000000..a944842c
Binary files /dev/null and b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c02.png differ
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c02.png.aux.xml b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c02.png.aux.xml
new file mode 100644
index 00000000..a4aaf5c4
--- /dev/null
+++ b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c02.png.aux.xml
@@ -0,0 +1,4 @@
+
+ GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]
+ -1.9695602541155296e+01, 1.9568407889871148e-02, 0.0000000000000000e+00, -7.0295684303741126e+01, 0.0000000000000000e+00, -1.9567344273831909e-02
+
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c03.pgw b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c03.pgw
new file mode 100644
index 00000000..a640ed5a
--- /dev/null
+++ b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c03.pgw
@@ -0,0 +1,6 @@
+0.01956840788987115
+0.0
+0.0
+-0.01956734427383191
+60.46638037970188
+-70.30546797587805
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c03.png b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c03.png
new file mode 100644
index 00000000..b5ace9f0
Binary files /dev/null and b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c03.png differ
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c03.png.aux.xml b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c03.png.aux.xml
new file mode 100644
index 00000000..5ce278ba
--- /dev/null
+++ b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c03.png.aux.xml
@@ -0,0 +1,14 @@
+
+ GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]
+ 6.0456596175756943e+01, 1.9568407889871148e-02, 0.0000000000000000e+00, -7.0295684303741126e+01, 0.0000000000000000e+00, -1.9567344273831909e-02
+
+
+ YES
+ 254
+ 249.21002752131
+ 125
+ 24.391855472776
+ 100
+
+
+
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c04.pgw b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c04.pgw
new file mode 100644
index 00000000..b9c70296
--- /dev/null
+++ b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c04.pgw
@@ -0,0 +1,6 @@
+0.01956840788987115
+0.0
+0.0
+-0.01956734427383191
+140.6185790966141
+-70.30546797587805
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c04.png b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c04.png
new file mode 100644
index 00000000..0c966954
Binary files /dev/null and b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c04.png differ
diff --git a/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c04.png.aux.xml b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c04.png.aux.xml
new file mode 100644
index 00000000..3ef10fd2
--- /dev/null
+++ b/test/hybig/reference_data/colour_map/PREFIRE_SAT2_2B-FLX_S07_R00_20210721013413_03040.nc.G00.r02c04.png.aux.xml
@@ -0,0 +1,4 @@
+
+ GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]
+ 1.4060879489266915e+02, 1.9568407889871148e-02, 0.0000000000000000e+00, -7.0295684303741126e+01, 0.0000000000000000e+00, -1.9567344273831909e-02
+
diff --git a/test/hybig/reference_data/dimensions/VCF5KYR_1991001_001_2018224205008.txt b/test/hybig/reference_data/dimensions/VCF5KYR_1991001_001_2018224205008.pgw
similarity index 100%
rename from test/hybig/reference_data/dimensions/VCF5KYR_1991001_001_2018224205008.txt
rename to test/hybig/reference_data/dimensions/VCF5KYR_1991001_001_2018224205008.pgw
diff --git a/test/hybig/reference_data/scale_size/VCF5KYR_1991001_001_2018224205008.txt b/test/hybig/reference_data/scale_size/VCF5KYR_1991001_001_2018224205008.pgw
similarity index 100%
rename from test/hybig/reference_data/scale_size/VCF5KYR_1991001_001_2018224205008.txt
rename to test/hybig/reference_data/scale_size/VCF5KYR_1991001_001_2018224205008.pgw
diff --git a/test/hybig/reference_data/tiled/VCF5KYR_1991001_001_2018224205008.txt b/test/hybig/reference_data/tiled/VCF5KYR_1991001_001_2018224205008.txt
deleted file mode 100644
index f9610b96..00000000
--- a/test/hybig/reference_data/tiled/VCF5KYR_1991001_001_2018224205008.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-/tmp/tmpkp0l7w_q/1e6d8e6a2c90bc1108f8dd03f2e2e7f30e379a984ce287da0e42efe14316c44a.r00c00.png, /tmp/tmpkp0l7w_q/1e6d8e6a2c90bc1108f8dd03f2e2e7f30e379a984ce287da0e42efe14316c44a.r00c00.pgw, /tmp/tmpkp0l7w_q/1e6d8e6a2c90bc1108f8dd03f2e2e7f30e379a984ce287da0e42efe14316c44a.r00c00.png.aux.xml
-/tmp/tmpkp0l7w_q/1e6d8e6a2c90bc1108f8dd03f2e2e7f30e379a984ce287da0e42efe14316c44a.r00c01.png, /tmp/tmpkp0l7w_q/1e6d8e6a2c90bc1108f8dd03f2e2e7f30e379a984ce287da0e42efe14316c44a.r00c01.pgw, /tmp/tmpkp0l7w_q/1e6d8e6a2c90bc1108f8dd03f2e2e7f30e379a984ce287da0e42efe14316c44a.r00c01.png.aux.xml
-/tmp/tmpkp0l7w_q/1e6d8e6a2c90bc1108f8dd03f2e2e7f30e379a984ce287da0e42efe14316c44a.r00c02.png, /tmp/tmpkp0l7w_q/1e6d8e6a2c90bc1108f8dd03f2e2e7f30e379a984ce287da0e42efe14316c44a.r00c02.pgw, /tmp/tmpkp0l7w_q/1e6d8e6a2c90bc1108f8dd03f2e2e7f30e379a984ce287da0e42efe14316c44a.r00c02.png.aux.xml
-/tmp/tmpkp0l7w_q/1e6d8e6a2c90bc1108f8dd03f2e2e7f30e379a984ce287da0e42efe14316c44a.r00c03.png, /tmp/tmpkp0l7w_q/1e6d8e6a2c90bc1108f8dd03f2e2e7f30e379a984ce287da0e42efe14316c44a.r00c03.pgw, /tmp/tmpkp0l7w_q/1e6d8e6a2c90bc1108f8dd03f2e2e7f30e379a984ce287da0e42efe14316c44a.r00c03.png.aux.xml
-/tmp/tmpkp0l7w_q/1e6d8e6a2c90bc1108f8dd03f2e2e7f30e379a984ce287da0e42efe14316c44a.r00c04.png, /tmp/tmpkp0l7w_q/1e6d8e6a2c90bc1108f8dd03f2e2e7f30e379a984ce287da0e42efe14316c44a.r00c04.pgw, /tmp/tmpkp0l7w_q/1e6d8e6a2c90bc1108f8dd03f2e2e7f30e379a984ce287da0e42efe14316c44a.r00c04.png.aux.xml
diff --git a/test/hybig/utility.py b/test/hybig/utility.py
index 7e052f89..9e405328 100644
--- a/test/hybig/utility.py
+++ b/test/hybig/utility.py
@@ -16,16 +16,24 @@ def print_success(success_string: str) -> str:
def assert_dataset_produced_correct_results(
- generated_file: Path, expected_metadata: dict, reference_file: Path, file_type: str
+ generated_file: Path, reference_file: Path, file_type: str
) -> None:
- """Check that the generated data matches the expected data."""
+ """Check that the generated data matches the expected data.
+ This function compares the metadata and the array values of
+ the generated test output against a reference file. Some
+ metadata read by `rasterio`, such as the CRS and geotransform,
+ are retrieved from a sibling `.aux.xml` file, meaning the
+ content of the test output and reference files for these
+ siblings is also being tested.
+
+ """
with rasterio.open(generated_file) as test_dataset:
- assert (
- test_dataset.meta == expected_metadata
- ), f'output {file_type} has incorrect metadata: {test_dataset.meta}'
- print_success('Generated image has correct metadata.')
-
with rasterio.open(reference_file) as reference_dataset:
+ assert (
+ test_dataset.meta == reference_dataset.meta
+ ), f'output {file_type} has incorrect metadata: {test_dataset.meta}'
+ print_success('Generated image has correct metadata.')
+
ref_image = reference_dataset.read()
test_image = test_dataset.read()
assert_array_almost_equal(ref_image, test_image)
diff --git a/test/hybig/version.txt b/test/hybig/version.txt
index d169b2f2..c5d54ec3 100644
--- a/test/hybig/version.txt
+++ b/test/hybig/version.txt
@@ -1 +1 @@
-0.0.8
+0.0.9