Endpoint for Labels.

Limitations

The response of the root endpoint is sorted by object_id: it is recommended to use a valid_at filters to have a deterministic sorting (especially if there are multiple pages). This is not required for backwards compatibility reasons.

Spatial filtering is limited to a maximum bounding box size of 0.022 degrees (zoom level 14). This limitation goes for all spatial filters: in_bbox, geom_within, geom_intersects, boundary_id, boundary_code, and boundary_name. This limitation is ignored if an object_id is specified.

Custom route: counts

The /labels/counts/ endpoint counts the number of labels per label_value. It is advisable to use the valid_at filter to not double- count labels attached to the same object.

The geometric filters have the same limitation as the root endpoint, unless label counts are pre-computed. Contact the service desk to schedule a nightly updated label count cache for a specific label type and set of boundaries.

Custom route: bulkdelete

The /labels/bulkdelete/ endpoint deletes all labels that meet the filter criteria. Labels for which the user has only read privileges cannot be deleted.

Custom route: export

A POST to /labels/export/ endpoint starts a label export to a file. Please consult that endpoint for the documentation.

Query parameters

object_id: Filter on the ID of the labeled object.

valid_at: Return the labels valid at given datetime. Filter values should be specified in ISO 8601 YYYY-MM-DDThh:mm:ssZ.

start/end: Temporal filter on start and end. Filter values should be specified in ISO 8601 YYYY-MM-DDThh:mm:ssZ

geom_intersects: Spatial filter on geometry of labelled objects. Filter operator is ST_intersects. Supports WKT, HEXEWKB, and GeoJSON.

in_bbox: Spatial filter on geometry of labelled objects. The bounding box format is: min Lat, min Lon, max Lat, max Lon. Includes labels for objects that overlap the bounding box.

boundary_id: Filter on geometry of the region with the id boundary_id.

boundary_code: Filter on geometry of the region with the id boundary_code.

boundary_type: Spatial filter on geometry, whereby geometry is specified by an region object (see below) and filter operator is ST_Intersects. Available types are COUNTRY, PROVINCE, WATER_BOARD, MUNICIPALITY, CATCHMENT, POLDER, FIXED_DRAINAGE_LEVEL_AREA, PUMPED_DRAINAGE_AREA, MAIN_PUMPED_DRAINAGE_AREA, DISTRICT, NEIGHBOURHOOD, CADASTRE, PLANTATION, FIELD, CITY, and CUSTOM

boundary_name: Filter on name of the region with the name boundary_name. Requires boundary_type.

simplify: Simplify the query geometries (in WGS84) using this value as tolerance. A higher value may result in a better response time for detailed geometries. Defaults to 0.00001 degrees (approx. 1 meter).

created: Temporal filter on created. Supports various lookup types (exact, lt, lte, gt, gte; created__exact by default). Filter values should be specified in ISO 8601 YYYY-MM-DDThh:mm:ssZ format.

Examples

?object_id=498521

?object_id=498521&valid_at=2019-01-01T02:03:04Z

?object_id=498521&start=2019-01-01T02:03:04Z

?start__lte=2019-01-01T02:03:04Z

?end__gte=2019-01-01T02:03:04Z

?end__lt=2019-01-02T02:03:04Z&start__gt=2019-01-01T02:03:04Z

?valid_at=2019-01-02T02:03:00Z

?geom_intersects=POLYGON((4.87 52.73, 4.87 52.75, 4.89 52.75, 4.89 52.73, 4.87 52.73))

?geometry__intersects=POINT (5 52)

?boundary__id=198

?boundary__code=NL_GM0344

?boundary__type=CITY&boundary__name=Utrecht

?created__gte=2017-01-01T00:00:00Z

Sub-endpoints

counts/?valid_at=2019-01-01T02:03:04Z

counts/?boundary_id=198&valid_at=2019-01-01T02:03:04Z

bulkdelete/
GET /api/v4/labeltypes/e23c58ea-ae39-41bf-9867-021a996034b8/labels/counts/?format=api
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "count": 324,
    "results": {
        "label_value": {
            "A": 113,
            "B": 156,
            "C": 55
        }
    }
}