diff --git a/README.md b/README.md index 12ca898e09ebf6db699dabb154d0fafd52db0613..1c4820ca9e4a5a3d6a101d8f98963e2917049175 100644 --- a/README.md +++ b/README.md @@ -1268,3 +1268,65 @@ query MyQuery { ``` Note that in the above example the API only returns 4 results because we dont have more in the dataset. + + +## Get the values of a property within a polygon + +```graphql +query MyQuery($first: Int, $offset: Int) { + wosisLatestProfiles( + filter: { + layers: { some: { sandValuesExist: true } } + geom: { + within: { + type: "Polygon" + coordinates: [ + [ + [-5.51345387228184, 9.59126476678042] + [-5.51345387228184, 11.0451128553676] + [-3.45410758209379, 11.0451128553676] + [-3.45410758209379, 9.59126476678042] + [-5.51345387228184, 9.59126476678042] + ] + ] + } + } + and: { + continent: { likeInsensitive: "Africa" } + countryName: { likeInsensitive: "burkina faso" } + } + } + first: $first + offset: $offset + ) { + latitude + longitude + layers(first: $first, filter: { sandValuesExist: true }, offset: $offset) { + sandValues(first: 6) { + profileId + profileCode + layerId + datasetId + continent + region + countryName + date + upperDepth + lowerDepth + valueAvg + licence + methodOptions + } + } + } +} +``` + +Variables: + +```json +{ + "first": 10, + "offset": 0 +} +`````` \ No newline at end of file