spatial

Spatial references

List each zone for a given level with their datasets count

get

/spatial/coverage/{level}//

Path parameters
levelstringrequired
Header parameters
X-Fieldsstring · mask

An optional fields mask

Responses
curl -L \
  --url '//www.data.gouv.fr/api/1/spatial/coverage/{level}/'
[
  {
    "type": "FeatureCollection",
    "features": [
      {
        "geometry": {
          "type": "Point",
          "coordinates": [
            {}
          ]
        },
        "id": "text",
        "properties": {},
        "type": "Feature"
      }
    ]
  }
]

List all known spatial granularities

get

/spatial/granularities/

Header parameters
X-Fieldsstring · mask

An optional fields mask

Responses
curl -L \
  --url '//www.data.gouv.fr/api/1/spatial/granularities/'
[
  {
    "id": "text",
    "name": "text"
  }
]

List all known levels

get

/spatial/levels/

Header parameters
X-Fieldsstring · mask

An optional fields mask

Responses
curl -L \
  --url '//www.data.gouv.fr/api/1/spatial/levels/'
[
  {
    "id": "text",
    "name": "text"
  }
]

Fetch a zone

get

/spatial/zone/{id}//

Path parameters
idstringrequired

A zone identifier

Responses
curl -L \
  --url '//www.data.gouv.fr/api/1/spatial/zone/{id}/'

No body

Fetch datasets for a given zone

get

/spatial/zone/{id}/datasets/

Path parameters
idstringrequired

A zone identifier

Query parameters
dynamicboolean

Append dynamic datasets

sizeinteger · default: 25

The amount of datasets to fetch

Header parameters
X-Fieldsstring · mask

An optional fields mask

Responses
curl -L \
  --url '//www.data.gouv.fr/api/1/spatial/zone/{id}/datasets/'
{
  "class": "text",
  "id": "text",
  "acronym": "text",
  "page": "text",
  "title": "text",
  "uri": "text"
}

Geospatial zones suggest endpoint using mongoDB contains

get

/spatial/zones/suggest/

Query parameters
qstringrequired

The string to autocomplete/suggest

sizeinteger · default: 10

The amount of suggestion to fetch

Header parameters
X-Fieldsstring · mask

An optional fields mask

Responses
curl -L \
  --url '//www.data.gouv.fr/api/1/spatial/zones/suggest/?q=text'
[
  {
    "code": "text",
    "id": "text",
    "level": "text",
    "name": "text",
    "uri": "text"
  }
]

Fetch a zone list as GeoJSON

get

/spatial/zones/{ids}//

Path parameters
idsstringrequired

A zone identifiers list (comma separated)

Header parameters
X-Fieldsstring · mask

An optional fields mask

Responses
curl -L \
  --url '//www.data.gouv.fr/api/1/spatial/zones/{ids}/'
{
  "type": "FeatureCollection",
  "features": [
    {
      "geometry": {
        "type": "Point",
        "coordinates": [
          {}
        ]
      },
      "id": "text",
      "properties": {},
      "type": "Feature"
    }
  ]
}

Dernière mise à jour

Cet article vous a-t-il été utile ?