-
Notifications
You must be signed in to change notification settings - Fork 4
Filters
Tom Demeyer edited this page Oct 22, 2014
·
6 revisions
Filters can be used to retrieve resources with selected attributes - for example, they can be used to:
- select all objects which geographically lie in a certain area,
- select all layers with a certain category,
- select all objects with certain key/value data.
Please note that filters only work for plural URIs, e.g. /objects
, /layers
.
- Name:
in
- Resources: objects
- Parameters:
Name | Type | Description |
---|---|---|
in |
cdk_id |
Select objects geographically inside cdk_id
|
- Example:
/objects?in=admr.city.amsterdam
- Name:
contains
- Resources: objects, layers
- Parameters:
Name | Type | Description |
---|---|---|
contains |
cdk_id |
Select objects which geographically contain cdk_id
|
- Example:
/objects?contains=gtfs.stop.21987
- Name:
bbox
- Resources: objects, layers
- Parameters:
Name | Type | Description |
---|---|---|
bbox |
double,double,double,double | lat,lon,lat,lon - corners of bounding box |
- Example:
/objects?bbox=52.367,4.915,52.3639,4.9562
- Name:
nearby
- Resources: objects, layers
- Parameters:
Name | Type | Description |
---|---|---|
lat |
double | Latitude of center point |
lon |
double | Longitude of center point |
radius |
double | Optional. Max. distance in meters from (lat, lon) |
- Example:
/objects?lat=52.367&lon=4.915&radius=500
- Name:
title
- Resources: objects, layers
- Parameters:
Name | Type | Description |
---|---|---|
title |
string | Find resources with matching title field (uses trigram matching) |
- Example:
/objects?title=plein
- Name:
data
- Resources: objects
- Parameters:
The data filter uses regular expression parameters, of the following form:
<layer>::<field>=<value>
Or:
<layer>::<field>
- Example:
/objects?osm::tourism=museum
- Example:
/objects?osm::tourism
- Name:
admin
- Resources: owners
- Parameters:
Name | Type | Description |
---|---|---|
admin |
boolean | Find owners which with or without administrative rights |
- Example:
/owners?admin=true
- Name:
authoritative
- Resources: layers
- Parameters:
Name | Type | Description |
---|---|---|
authoritative |
boolean | Find layers with or without authoritative flag |
- Example:
/layers?authoritative=true
- Name:
category
- Resources: layers
- Parameters:
Name | Type | Description |
---|---|---|
category |
string | Find layers |
- Example:
/layers?category=tourism
- Name:
type
- Resources: layers
- Parameters:
Name | Type | Description |
---|---|---|
type |
string | Find layers with a certain rdf_type
|
- Example:
/layers?type=cdk:OSM