kartoza / GEEST

Gender Enabling Environments Spatial Tool (GEEST)
https://worldbank.github.io/GEEST/
MIT License
1 stars 2 forks source link

Contextual aggregation raster #78

Open dragosgontariu opened 3 months ago

dragosgontariu commented 3 months ago

@osundwajeff @ClaraIV @carolinamayh @mvmaltitz

Hi Jeff,

Testing the Contextual factors they are in line with the thresholds but when it comes to final score for Contextual aggregation factors, the value it's not averaged.

Example tested:

WD is 83.8 and the raster has the value 4.19 (correct) RF is 100 for Pay and 40 for Parenthood and the raster gets after averaging the value 3.5 (correct) FI is 75 an the raster value is 3.75 (correct)

The aggregated raster which has the same weights and is a straightforward average for all 3 factors is 2.56 (incorrect) and should be 3.81.

Please double-check the values and ensure they are being averaged correctly.

osundwajeff commented 3 months ago

Hi @dragosgontariu

Thanks for picking up that. I'll take a look at it and fix it.

mvmaltitz commented 2 months ago

@timlinux

Contextual_score succeed with some Python error. Although the Contextual_score.tif exist but the value is incorrect, then it means the script failed to generate the correct value and save as a file.

2024-09-12T19:06:09     WARNING    Traceback (most recent call last):
              File "C:\Users/benny/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\gender_indicator_tool\gender_indicator_tool.py", line 6009, in contextual_aggregation
              with rasterio.open(aggregation, "w", **meta1) as dst:
              File "C:\Users\benny\AppData\Roaming\Python\Python39\site-packages\rasterio\env.py", line 451, in wrapper
              return f(*args, **kwds)
              File "C:\Users\benny\AppData\Roaming\Python\Python39\site-packages\rasterio\__init__.py", line 341, in open
              dataset = writer(
              File "rasterio\\_io.pyx", line 1464, in rasterio._io.DatasetWriterBase.__init__
              File "rasterio\\_io.pyx", line 330, in rasterio._io._delete_dataset_if_exists
              File "rasterio\\_err.pyx", line 195, in rasterio._err.exc_wrap_int
             rasterio._err.CPLE_AppDefinedError: Deleting Contextual_score.tif failed: Permission denied

See #134 and #135 for parent tickets with testing results and input data