spatial

Spatial references

List each zone for a given level with their datasets count

GET//www.data.gouv.fr/api/1/spatial/coverage/{level}/
Path parameters
level*string
Header parameters
Response

Success

Body
features*array of GeoJSONFeature (object)
type*enum
Example: "FeatureCollection"
FeatureCollection
Request
const response = await fetch('//www.data.gouv.fr/api/1/spatial/coverage/{level}/', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
[
  {
    "features": [
      {
        "geometry": {
          "coordinates": [],
          "type": "Point"
        },
        "id": "text",
        "type": "Feature"
      }
    ],
    "type": "FeatureCollection"
  }
]

List all known spatial granularities

GET//www.data.gouv.fr/api/1/spatial/granularities/
Header parameters
Response

Success

Body
id*string

The granularity identifier

name*string

The granularity name

Request
const response = await fetch('//www.data.gouv.fr/api/1/spatial/granularities/', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
[
  {
    "id": "text",
    "name": "text"
  }
]

List all known levels

GET//www.data.gouv.fr/api/1/spatial/levels/
Header parameters
Response

Success

Body
id*string

The level identifier

name*string

The level name

Request
const response = await fetch('//www.data.gouv.fr/api/1/spatial/levels/', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
[
  {
    "id": "text",
    "name": "text"
  }
]

Fetch a zone

GET//www.data.gouv.fr/api/1/spatial/zone/{id}/
Path parameters
id*string

A zone identifier

Response

Success

Request
const response = await fetch('//www.data.gouv.fr/api/1/spatial/zone/{id}/', {
    method: 'GET',
    headers: {},
});
const data = await response.json();

Fetch datasets for a given zone

GET//www.data.gouv.fr/api/1/spatial/zone/{id}/datasets/
Path parameters
id*string

A zone identifier

Query parameters
Header parameters
Response

Success

Body
class*string

The object class

id*string

The object unique identifier

acronymstring

An optional dataset acronym

pagestring

The web page URL for this dataset

titlestring

The dataset title

uristring

The API URI for this dataset

Request
const response = await fetch('//www.data.gouv.fr/api/1/spatial/zone/{id}/datasets/', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "class": "text",
  "id": "text",
  "acronym": "text",
  "page": "text",
  "title": "text",
  "uri": "text"
}

Geospatial zones suggest endpoint using mongoDB contains

GET//www.data.gouv.fr/api/1/spatial/zones/suggest/
Query parameters
Header parameters
Response

Success

Body
code*string

The territory main code

id*string

The territory identifier

level*string

The territory administrative level

name*string

The territory name

uri*string

The zone uri

Request
const response = await fetch('//www.data.gouv.fr/api/1/spatial/zones/suggest/?q=text', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
[
  {
    "code": "text",
    "id": "text",
    "level": "text",
    "name": "text",
    "uri": "text"
  }
]

Fetch a zone list as GeoJSON

GET//www.data.gouv.fr/api/1/spatial/zones/{ids}/
Path parameters
ids*string

A zone identifiers list (comma separated)

Header parameters
Response

Success

Body
features*array of GeoJSONFeature (object)
type*enum
Example: "FeatureCollection"
FeatureCollection
Request
const response = await fetch('//www.data.gouv.fr/api/1/spatial/zones/{ids}/', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "features": [
    {
      "geometry": {
        "coordinates": [],
        "type": "Point"
      },
      "id": "text",
      "type": "Feature"
    }
  ],
  "type": "FeatureCollection"
}

Dernière mise à jour

Revision created

Update faq-cadastre.md