Collecties
Lijst de datasets die Topolab exposeert als OGC feature collecties, en lees de metadata, omvang en links van een enkele collectie.
Collecties
Een collectie is een Topolab dataset die wordt weergegeven als een set geospatiale features. De id van elke collectie is de dataset table (bijvoorbeeld nl-domino-poi), dus dezelfde data die je via REST als een dataset bereikt, is hier bereikbaar als een collectie. Voor hoe deze termen zich verhouden, zie Concepten: datasets vs collecties.
Deze endpoints vereisen een API-sleutel met de GIS_ACCESS add-on, verzonden in de X-API-Key header. Zie Authenticatie.
Lijst collecties
curl -H "X-API-Key: tlb_prod_..." \
"https://api.topolab.nl/v1/ogc/collecties"
De response lijst elke collectie met zijn id, titel, ruimtelijke omvang en links naar zijn items.
{
"links": [
{
"rel": "self",
"type": "application/json",
"href": "https://api.topolab.nl/v1/ogc/collecties"
}
],
"collecties": [
{
"id": "nl-domino-poi",
"title": "Domino's Pizza Locaties (NL)",
"description": "Point-of-interest locaties voor Domino's Pizza in Nederland.",
"extent": {
"spatial": {
"bbox": [[3.36, 50.75, 7.23, 53.55]],
"crs": "http://www.opengis.net/def/crs/OGC/1.3/CRS84"
}
},
"crs": ["http://www.opengis.net/def/crs/OGC/1.3/CRS84"],
"links": [
{
"rel": "items",
"type": "application/geo+json",
"title": "Features",
"href": "https://api.topolab.nl/v1/ogc/collecties/nl-domino-poi/items"
},
{
"rel": "self",
"type": "application/json",
"href": "https://api.topolab.nl/v1/ogc/collecties/nl-domino-poi"
}
]
}
]
}
De extent.spatial.bbox is in WGS84 (EPSG:4326), geordend [minLon, minLat, maxLon, maxLat]. CRS84 is de OGC URI voor WGS84 met een longitude-first asvolgorde, wat overeenkomt met GeoJSON.
Haal een collectie op
Haal metadata op voor een enkele collectie aan de hand van zijn collectionId (de dataset table):
curl -H "X-API-Key: tlb_prod_..." \
"https://api.topolab.nl/v1/ogc/collecties/nl-domino-poi"
{
"id": "nl-domino-poi",
"title": "Domino's Pizza Locaties (NL)",
"description": "Point-of-interest locaties voor Domino's Pizza in Nederland.",
"extent": {
"spatial": {
"bbox": [[3.36, 50.75, 7.23, 53.55]],
"crs": "http://www.opengis.net/def/crs/OGC/1.3/CRS84"
}
},
"crs": ["http://www.opengis.net/def/crs/OGC/1.3/CRS84"],
"itemType": "feature",
"links": [
{
"rel": "items",
"type": "application/geo+json",
"title": "Features",
"href": "https://api.topolab.nl/v1/ogc/collecties/nl-domino-poi/items"
},
{
"rel": "self",
"type": "application/json",
"href": "https://api.topolab.nl/v1/ogc/collecties/nl-domino-poi"
}
]
}
Volg de items link om de features te lezen. Zie Items voor paging en bbox en filtering voor het verfijnen van resultaten.
Fouten
| Status | Betekenis |
|---|---|
401 |
Ontbrekende of ongeldige API-sleutel. |
403 |
Sleutel is geldig, maar de organisatie mist de GIS_ACCESS add-on. |
404 |
Onbekende collectionId. |
429 |
Snelheidslimiet overschreden. |
Volgende
- Items — blader door de features van een collectie.
- Enkele feature — haal één feature op aan de hand van id.
- Heb je
GIS_ACCESS? Neem contact met ons op.