|
|
|
|
Re: Problem opening geojsons using API [message #30779 is a reply to message #30672] |
Mon, 03 March 2025 22:01   |
Benjaminn
Messages: 1 Registered: March 2025
|
Member |
|
|
oliver-fiala wrote on Fri, 17 January 2025 10:42I am familiarising myself at the moment with the possibility to call spatial boundary files for selected DHS surveys using the API (as described here: https://api.dhsprogram.com/#/api-geometry.cfm geometry dash).
While this works fabulously for some surveys (eg, the suggested example http://api.dhsprogram.com/rest/dhs/geometry/SN2010DHS works well, both with QGIS as well as with geospatial tools in Stata), many other surveyIds or country codes (eg, BD2014DHS or BD or EG) produce errors with any programme, suggesting there are issues with the geojson. I was wondering if this is a known problem or if I am missing anything?
You are correct in observing that while the DHS Program's API provides access to spatial boundary files for certain surveys (e.g., SN2010DHS), attempts to retrieve geometry data for others, such as BD2014DHS, BD, or EG, result in errors. This issue has been acknowledged by the DHS Program.
[Updated on: Mon, 03 March 2025 22:02] Report message to a moderator
|
|
|
Re: Problem opening geojsons using API [message #30839 is a reply to message #30672] |
Tue, 25 March 2025 00:03  |
Rosbl
Messages: 1 Registered: March 2025
|
Member |
|
|
oliver-fiala wrote on Fri, 17 January 2025 10:42I am familiarising myself at the moment with the possibility to call spatial boundary files for selected DHS surveys using the API (as described here: https://api.dhsprogram.com/#/api-geometry.cfm).
While this works fabulously for some surveys (eg, the suggested example http://api.dhsprogram.com/rest/dhs/geometry/SN2010DHS/agar io works well, both with QGIS as well as with geospatial tools in Stata), many other surveyIds or country codes (eg, BD2014DHS or BD or EG) produce errors with any programme, suggesting there are issues with the geojson. I was wondering if this is a known problem or if I am missing anything?
The API should generally provide valid GeoJSON for available surveys, but not all surveys have spatial boundary files released due to data confidentiality restrictions or availability issues. If a specific survey (e.g., BD2014DHS or EG) does not return a valid response, it is possible that the boundary files are not publicly available. You may want to check the DHS Spatial Data Repository or the survey's documentation for confirmation.
|
|
|