Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Factor: Water Sanitation - Water points (OSM), catch basins, water valves and fire hydrants (Mapillary) #48

Open
Tracked by #15
timlinux opened this issue Jun 21, 2024 · 7 comments
Assignees
Labels
🔍️ Factor Analysis factors 🏙️ Place characterization Dimension - place characterization

Comments

@timlinux
Copy link

This indicator is composed by assessing the presence of any of these four factors in a raster cell. First, the territory needs to be divided into 100m x 100m rasters. The scoring for each cell is as follows:

Raster cell with no water points: score 0
Raster cell with 1 water point: score 3
Raster cell with 2 or more water points: score 5

If from OSM:


[out:xml] [timeout:25];
 {{geocodeArea:Saint Lucia}} -> .area_0;
(
    node["emergency"="fire_hydrant"](area.area_0);
    node["emergency"="water_tank"](area.area_0);
    node["amenity"="drinking_water"](area.area_0);
    node["amenity"="water_point"](area.area_0);
    way["emergency"="fire_hydrant"](area.area_0);
    way["emergency"="water_tank"](area.area_0);
    way["amenity"="drinking_water"](area.area_0);
    way["amenity"="water_point"](area.area_0);
    relation["emergency"="fire_hydrant"](area.area_0);
    relation["emergency"="water_tank"](area.area_0);
    relation["amenity"="drinking_water"](area.area_0);
    relation["amenity"="water_point"](area.area_0);
);
(._;>;);
out body;

If from Mapilliary:

endpoints: object--catch-basin object--water-valve and object--fire-hydrant
@timlinux timlinux added the 🔍️ Factor Analysis factors label Jun 21, 2024
@amyburness amyburness added the 🏙️ Place characterization Dimension - place characterization label Jun 21, 2024
@carolinamayh
Copy link
Collaborator

NOTE: I believe the original name of the factor was Access to Water and Sanitation; however, this should be changed to Water and Sanitation. As mentioned in the original instructions, the scores are assigned by dividing the country territory into 100x100m raster cells. If the cell contains point features such as water points, catch basins, water valves, or fire hydrants, scores are assigned as follows:

Raster cell with no water points: score 0
Raster cell with 1 water point: score 3
Raster cell with 2 or more water points: score 5

@osundwajeff

@osundwajeff osundwajeff added the Size 5 It will take between half a day and a full day label Jul 29, 2024
@osundwajeff osundwajeff pinned this issue Aug 7, 2024
@osundwajeff osundwajeff unpinned this issue Aug 7, 2024
@mvmaltitz mvmaltitz added this to the Indicator Enhancements milestone Aug 13, 2024
@mvmaltitz
Copy link

Result:

Image

@dragosgontariu

@mvmaltitz mvmaltitz removed the Size 5 It will take between half a day and a full day label Aug 15, 2024
@dragosgontariu
Copy link
Collaborator

@osundwajeff @mvmaltitz @javaftw
Whey there are water points from input but 0 score from output?

Image

@javaftw
Copy link
Collaborator

javaftw commented Aug 22, 2024

@dragosgontariu
Hi Dragos, I am struggling to replicate the issue with synthetic data, might you please supply or identify the specific dataset you are used for the above test?

Image

Image

@ClaraIV
Copy link

ClaraIV commented Aug 26, 2024

hi colleagues, as you know, we have processed all the PC factors manually for the conference this week, to ensure timely results. In this process we noticed that the current computation of this factor is not ideal. What we decided is to measure access using buffers, assuming that if a feature exists, more likely access exists in the area, even if the data is not recorded.
As such, we considered a 1 km buffers for each point. Everything within the buffer is assigned a value of 5, while everything outside is assigned a value of 0.

Could you kindly make these adjustments to the factor computation, and the descriptive text? Thank you
@mvmaltitz @osundwajeff

@javaftw
Copy link
Collaborator

javaftw commented Aug 27, 2024

@ClaraIV
Changes implemented:
Image

@mvmaltitz
Copy link

@timlinux

Water process failed. The label next to Execute button appear with text

Error: Clipping failed. Putput file not created: D\temp\geest\geest_qgis_template\output\fji_test_20240912\Place Characterization\WAS.tif

Screenshot 2024-09-12 231756

And trigger a Python error below

2024-09-12T23:11:14     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 4778, in WAS_rasterizer_v2
              raise FileNotFoundError(f"Clipping failed. Output file not created: {rasOutput}")
             FileNotFoundError: Clipping failed. Output file not created: D:\temp\geest\geest_qgis_templates\output\fji_test_20240912\Place Characterization\WAS.tif

And the Processing log below

2024-09-12T23:11:12     INFO    Results: {'OUTPUT': 'output_89901603_4adc_4a87_ba38_8ac620cac862'}
2024-09-12T23:11:12     INFO    Results: {'OUTPUT': 'output_aad3ff82_d243_476c_814e_39e342def1f7'}
2024-09-12T23:11:12     INFO    Results: {'OUTPUT': 'output_d4f51d78_0506_482f_9440_44b73f7990a3'}
2024-09-12T23:11:13     INFO    gdal_rasterize -l INPUT -a buffer_value -tr 100.0 100.0 -init 0.0 -a_nodata -9999.0 -te 2521404.4815840046 -2672812.0677260184 2957862.1149176797 -1597099.3760041117 -ot Float32 -of GTiff C:/TEMP/processing_ePBkbN/07f655912a654e3887e1e993e52eac61/INPUT.gpkg D:\temp\geest\geest_qgis_templates\output\fji_test_20240912\temp\temp_WAS.tif
2024-09-12T23:11:13     INFO    GDAL command:
2024-09-12T23:11:13     INFO    gdal_rasterize -l INPUT -a buffer_value -tr 100.0 100.0 -init 0.0 -a_nodata -9999.0 -te 2521404.4815840046 -2672812.0677260184 2957862.1149176797 -1597099.3760041117 -ot Float32 -of GTiff C:/TEMP/processing_ePBkbN/07f655912a654e3887e1e993e52eac61/INPUT.gpkg D:\temp\geest\geest_qgis_templates\output\fji_test_20240912\temp\temp_WAS.tif
2024-09-12T23:11:13     INFO    GDAL command output:
2024-09-12T23:11:13     INFO    Process completed successfully
2024-09-12T23:11:13     INFO    Results: {'OUTPUT': 'D:\\temp\\geest\\geest_qgis_templates\\output\\fji_test_20240912\\temp\\temp_WAS.tif'}
2024-09-12T23:11:13     INFO    gdalwarp -overwrite -t_srs EPSG:8859 -of GTiff -cutline D:\temp\geest\geest_qgis_templates\layers\iso3\fji_input\fji_polbnda_adm0_country_8859.shp -cl fji_polbnda_adm0_country_8859 -crop_to_cutline -dstnodata -9999.0 D:\temp\geest\geest_qgis_templates\output\fji_test_20240912\temp\temp_WAS.tif "D:\\temp\\geest\\geest_qgis_templates\\output\\fji_test_20240912\\Place Characterization\\WAS.tif"
2024-09-12T23:11:13     INFO    GDAL command:
2024-09-12T23:11:13     INFO    gdalwarp -overwrite -t_srs EPSG:8859 -of GTiff -cutline D:\temp\geest\geest_qgis_templates\layers\iso3\fji_input\fji_polbnda_adm0_country_8859.shp -cl fji_polbnda_adm0_country_8859 -crop_to_cutline -dstnodata -9999.0 D:\temp\geest\geest_qgis_templates\output\fji_test_20240912\temp\temp_WAS.tif "D:\\temp\\geest\\geest_qgis_templates\\output\\fji_test_20240912\\Place Characterization\\WAS.tif"
2024-09-12T23:11:13     INFO    GDAL command output:
2024-09-12T23:11:14     CRITICAL    Process returned error code 1
2024-09-12T23:11:14     INFO    Results: {'OUTPUT': 'D:\\temp\\geest\\geest_qgis_templates\\output\\fji_test_20240912\\Place Characterization\\WAS.tif'}
2024-09-12T23:11:14     INFO    0...10...20...30...40...50...60...70...80...90...100 - done.
2024-09-12T23:11:14     CRITICAL    Warning 1: Ring Self-intersection at or near point 2617160.3599800956 -2438488.8009277876
2024-09-12T23:11:14     CRITICAL    ERROR 1: Cutline polygon is invalid.

See #134 and #135 for full testing and input data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔍️ Factor Analysis factors 🏙️ Place characterization Dimension - place characterization
Projects
None yet
Development

No branches or pull requests

8 participants