areas

Search through Windward’s available polygon layers by layer type, and get a list of all available areas with their names and ID to allow the utilization of Windward polygons for user queries.

Query Schema

type Query {
   areas(filter: AreaFilterInput!): [FeatureObject]
}

Arguments

NameTypeDescription
filterAreaFilterInput!Sets the type of areas returned by the query.

Schema

input AreaFilterInput {
  ids: [ObjectId!]
  types: [AreaTypes!]
}

AreaFilterInput Fields

NameTypeDescription
ids[ObjectId!]The unique polygon Windward assigned ID.
types[AreaTypes!]The polygon type.

Returns

NameDescription
[FeatureObject]The GeoJson objects which specify geographical features in a JSON format.

FeatureObject Fields

Name

Type

Description

id

ObjectId

The polygon Unique Windward assigned ID.

properties

PointProps

Returns the properties of the polygon.

type

String

The type of the GeoJSON object, e.g., Position, Point, MultiPoint, Polygon.

Refer to geojson.org to learn about the available types.

Example Code

Sample Query

query Areas($filter: AreaFilterInput!) {
  areas(filter: $filter) {
    id
    type
    properties {
      name
      areaType
      country
      locode
      secondaryLocodes
    }
  }
}

Variables

{
  "filter": {
    "ids": [],
    "types": ["EEZ"]
  }
}

Response

{
  "data": {
    "areas": [
      {
        "id": "54880a1a2f16092e9efe6051",
        "type": "Feature",
        "properties": {
          "name": "Azerbaijan",
          "areaType": "EEZ",
          "country": null,
          "locode": null,
          "secondaryLocodes": null
        }
      },
      {
        "id": "54880a1a2f16092e9efe6055",
        "type": "Feature",
        "properties": {
          "name": "Barbados",
          "areaType": "EEZ",
          "country": null,
          "locode": null,
          "secondaryLocodes": null
        }
      },
      {
        "id": "54880a1a2f16092e9efe6080",
        "type": "Feature",
        "properties": {
          "name": "Haiti",
          "areaType": "EEZ",
          "country": null,
          "locode": null,
          "secondaryLocodes": null
        }
      }
    ]
  }
}