Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
giscience
big-data
ohsome
helpers
check-ohsome-api
Commits
fc4cf17d
Verified
Commit
fc4cf17d
authored
May 29, 2020
by
Johannes Visintini
Browse files
added more examples
parent
777962c1
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
fc4cf17d
...
...
@@ -28,10 +28,10 @@ Status Amount
### Requests from File
Check requests given in
[
example-requests.json
](
example-requests.json
)
:
Check requests given in
[
example-requests.json
](
examples/
example-requests.json
)
:
```
bash
% python3 check-ohsome-api.py
-a
v1
-r
example-requests.json
% python3 check-ohsome-api.py
-a
v1
-r
examples/
example-requests.json
Running requests
POST 400: https://api.ohsome.org/v1/elements/count
→
{
'time'
:
'2010-01-01/2016-08-01/P2Y2M2D'
,
'filter'
:
'highway=residential and type:way'
,
'note'
:
'bboxes missing on purpose'
}
...
...
@@ -45,9 +45,9 @@ Status Amount
### Check Local Instance
Check requests given in
[
example-requests.json
](
example-requests.json
)
with local running ohsome API:
Check requests given in
[
example-requests.json
](
examples/
example-requests.json
)
with local running ohsome API:
```
bash
% python3 check-ohsome-api.py
-b
http://localhost:8080
-r
example-requests.json
% python3 check-ohsome-api.py
-b
http://localhost:8080
-r
examples/
example-requests.json
Running requests
POST 400: http://localhost:8080/elements/count
→
{
'time'
:
'2010-01-01/2016-08-01/P2Y2M2D'
,
'filter'
:
'highway=residential and type:way'
,
'note'
:
'bboxes missing on purpose'
}
...
...
examples/docs-requests.json
0 → 100644
View file @
fc4cf17d
{
"requests"
:
[
{
"method"
:
"GET"
,
"path"
:
"/elements/area"
,
"parameters"
:
{
"bboxes"
:
"8.625%2C49.3711%2C8.7334%2C49.4397"
,
"format"
:
"json"
,
"time"
:
"2014-01-01"
,
"filter"
:
"landuse%3Dfarmland%20and%20type%3Away"
}
},
{
"method"
:
"POST"
,
"path"
:
"/elements/area"
,
"parameters"
:
{
"bboxes"
:
"8.625,49.3711,8.7334,49.4397"
,
"format"
:
"json"
,
"time"
:
"2014-01-01"
,
"filter"
:
"landuse=farmland and type:way"
}
},
{
"method"
:
"GET"
,
"path"
:
"/elements/count/density"
,
"parameters"
:
{
"bboxes"
:
"8.625%2C49.3711%2C8.7334%2C49.4397"
,
"format"
:
"json"
,
"filter"
:
"amenity%3Drestaurant%20and%20wheelchair%3Dyes%20and%20type%3Anode"
,
"time"
:
"2019-05-07"
}
},
{
"method"
:
"POST"
,
"path"
:
"/elements/count/density"
,
"parameters"
:
{
"bboxes"
:
"8.625,49.3711,8.7334,49.4397"
,
"format"
:
"json"
,
"time"
:
"2019-05-07"
,
"filter"
:
"amenity=restaurant and wheelchair=yes and type:node"
}
},
{
"method"
:
"GET"
,
"path"
:
"/elements/length/ratio"
,
"parameters"
:
{
"bboxes"
:
"8.625%2C49.3711%2C8.7334%2C49.4397"
,
"format"
:
"json"
,
"filter"
:
"highway%3Dliving_street%20and%20type%3Away"
,
"filter2"
:
"highway%3Dliving_street%20and%20oneway%3Dyes%20and%20type%3Away"
,
"time"
:
"2016-01-01%2F2018-01-01%2FP1Y"
}
},
{
"method"
:
"POST"
,
"path"
:
"/elements/length/ratio"
,
"parameters"
:
{
"bboxes"
:
"8.625,49.3711,8.7334,49.4397"
,
"format"
:
"json"
,
"time"
:
"2016-01-01/2018-01-01/P1Y"
,
"filter"
:
"highway=living_street and type:way"
,
"filter2"
:
"highway=living_street and oneway=yes and type:way"
}
},
{
"method"
:
"GET"
,
"path"
:
"/elements/count/groupBy/key"
,
"parameters"
:
{
"bboxes"
:
"Heidelberg:8.625%2C49.3711%2C8.7334%2C49.4397"
,
"format"
:
"json"
,
"time"
:
"2018-01-01"
,
"filter"
:
"building%3D*%20and%20type%3Away"
,
"groupByKeys"
:
"building%3Aroof%2Cbuilding%3Aroof%3Acolour"
}
},
{
"method"
:
"POST"
,
"path"
:
"/elements/count/groupBy/key"
,
"parameters"
:
{
"bboxes"
:
"Heidelberg:8.625,49.3711,8.7334,49.4397"
,
"format"
:
"json"
,
"time"
:
"2018-01-01"
,
"groupByKeys"
:
"building:roof,building:roof:colour"
,
"filter"
:
"building=* and type:way"
}
},
{
"method"
:
"GET"
,
"path"
:
"/elements/length/groupBy/boundary/groupBy/tag"
,
"parameters"
:
{
"bboxes"
:
"Heidelberg%3A8.625%2C49.3711%2C8.7334%2C49.4397%7CPlankstadt%3A8.5799%2C49.3872%2C8.6015%2C49.4011"
,
"format"
:
"json"
,
"groupByKey"
:
"highway"
,
"time"
:
"2018-01-01"
,
"groupByValues"
:
"primary%2Csecondary%2Ctertiary"
,
"filter"
:
"type%3Away"
}
},
{
"method"
:
"POST"
,
"path"
:
"/elements/length/groupBy/boundary/groupBy/tag"
,
"parameters"
:
{
"bboxes"
:
"Heidelberg:8.625,49.3711,8.7334,49.4397|Plankstadt:8.5799,49.3872,8.6015,49.4011"
,
"format"
:
"json"
,
"time"
:
"2018-01-01"
,
"filter"
:
"type:way"
,
"groupByKey"
:
"highway"
,
"groupByValues"
:
"primary,secondary,tertiary"
}
},
{
"method"
:
"GET"
,
"path"
:
"/users/count"
,
"parameters"
:
{
"bboxes"
:
"82.3055%2C6.7576%2C87.4663%2C28.7025"
,
"format"
:
"json"
,
"filter"
:
"building%3D*%20and%20type%3Away"
,
"time"
:
"2015-03-01%2F2015-08-01%2FP1M"
}
},
{
"method"
:
"POST"
,
"path"
:
"/users/count"
,
"parameters"
:
{
"bboxes"
:
"82.3055,6.7576,87.4663,28.7025"
,
"format"
:
"json"
,
"time"
:
"2015-03-01/2015-08-01/P1M"
,
"filter"
:
"building=* and type:way"
}
},
{
"method"
:
"GET"
,
"path"
:
"/elements/geometry"
,
"parameters"
:
{
"bboxes"
:
"8.625%2C49.3711%2C8.7334%2C49.4397"
,
"filter"
:
"amenity%3Dbicycle_rental%20and%20type%3Anode"
,
"time"
:
"2019-09-01"
}
},
{
"method"
:
"POST"
,
"path"
:
"/elements/geometry"
,
"parameters"
:
{
"bboxes"
:
"8.625,49.3711,8.7334,49.4397"
,
"time"
:
"2019-09-01"
,
"filter"
:
"amenity=bicycle_rental and type:node"
}
},
{
"method"
:
"GET"
,
"path"
:
"/elementsFullHistory/geometry"
,
"parameters"
:
{
"bboxes"
:
"8.7137%2C49.4096%2C8.717%2C49.4119"
,
"filter"
:
"name%3DKrautturm%20and%20type%3Away"
,
"time"
:
"2008-01-01%2C2016-01-01"
}
},
{
"method"
:
"POST"
,
"path"
:
"/elementsFullHistory/geometry"
,
"parameters"
:
{
"bboxes"
:
"8.7137,49.4096,8.717,49.4119"
,
"time"
:
"2008-01-01,2016-01-01"
,
"filter"
:
"name=Krautturm and type:way"
}
},
{
"method"
:
"GET"
,
"path"
:
"/metadata"
}
]
}
example-requests.json
→
examples/
example-requests.json
View file @
fc4cf17d
File moved
examples/test-requests.json
0 → 100644
View file @
fc4cf17d
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment