• Home
  • About

GIScience News Blog

News of Heidelberg University’s GIScience Research Group.

Feed on
Posts
Comments
« GIScience for physical activity research
Successfull PhD Defence of Xuke Hu about Indoor Building Reconstruction from different Sources »

New function in the ohsome API for checking query parameters

Jul 23rd, 2020 by Fabian Kowatsch

As you may already know from the latest blog posts, new advancements are brought with the release 1.0 of the #ohsome API. One minor function involves the correctness of parameters that you can use in your queries, which was developed by our intern Rosario in the last weeks.

The new feature

Let’s say you send a request to compute the amount of residential buildings in a small area in Heidelberg on 1st of January 2015. You misspell the parameter “bboxes” and write “bbox” instead. In this case, the new feature of the ohsome API will give you a quick response back, indicating that the parameter “bbox” is unknown and it will suggest – if possible – the proper parameter to use. The response of the ohsome API will look as follows:

{
"timestamp": "2020-07-13T14:58:05.346",
"status": 400,
"message": "Unknown parameter 'bbox' for this resource. Did you mean 'bboxes'?",
"requestUrl": "https://api.ohsome.org/v1/elements/count?bbox=8.67452,49.40961,8.70392,49.41823&time=2015-01-01&filter=building=residential and type:way“
}

You could also use a parameter which is correct, but is supposed to be used for other resources. Let’s suppose you make this request. Although the ohsome API knows about the parameter “properties”, its use in this context is wrong, since “properties” doesn’t work for /elements/count (here you can find a list about which parameter works for which resource). The ohsome API will give the following message back:

“message”: “Unknown parameter ‘properties’ for this resource.”

So don’t be afraid to be wrong, the ohsome API will help you!

How it works

The new implemented feature uses a string similarity algorithm called “Fuzzy Score”: When an unfit parameter is encountered, it is compared against the list of correct parameters for the requested resource of the ohsome API. If a sequence of characters matches against a sequence of characters of a proper parameter in the list, then the algorithm will give points to this parameter. A higher final score indicates that more characters are in sequence, which implicates more similarity. Only the first two parameters with the highest score will be suggested in the response. Each of them must have at least a score of five. If the score is lower than five, you will get only an “unknown parameter” message without suggestion. We chose five because according to the behavior of the algorithm and to our set of valid parameters, a score of five is suitable as threshold to either give a suggestion (score >= 5) or don’t (score < 5). Furthermore, the algorithm is case insensitive, which means it works regardless if the parameter is written in upper or lower case letters.

Before writing the code we valuated a lot of string similarity algorithms which could have helped for our purpose. If you want to know more about it, you can start by checking this easy introduction. Also if you want to know how this feature was implemented, check the code on GitHub: StringSimilarity.java and ResourceParameters.java.

ohsome sounds like awesome

Background Info

The aim of the ohsome OpenStreetMap History Data Analytics Platform is to make OpenStreetMap’s full-history data more easily accessible for various kinds of OSM data analytics tasks, such as data quality analysis, on a global scale. The ohsome API is one of its components, providing free and easy access to some of the functionalities of the ohsome platform via HTTP requests. Some intro can be found here:

  • ohsome general architecture
  • the whole “how to become ohsome” tutorials series
  • how to make a query
  • integration of simple feature keywords in the filters of the ohsome API.
  • how spatial joins queries work in the OpenStreetMap History Database OSHDB

Tags: Big Spatial Data, heigit, intrinsic quality analysis, JAVA, ohsome, OpenStreetMap, OSM, OSM History Analytics

Posted in Services, Software

Comments are closed.

  • About

    GIScience News Blog
    News of Heidelberg University’s GIScience Research Group.
    There are 1,459 Posts and 0 Comments so far.

  • Meta

    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org
  • Recent Posts

    • Keynote at McGILL GIS DAY: Analysing and Improving OpenStreetMap for Humanitarian Aid with Data Mining and GeoAI
    • Update on “Accessibility of COVID-19 vaccination centers in Germany”
    • Globales Gletschermonitoring - Chance und Herausforderung — HGG Vortrag am 19.Januar 2021 Dr. Isabelle Gärtner-Roer, World Glacier Monitoring Service, Universität Zürich
    • Accessibility to pharmacies in Germany with 15km Covid-19 restriction
    • 4D change analysis for improving our understanding of dynamic landscapes
  • Tags

    3D 3DGEO Big Spatial Data CAP4Access Citizen Science Colloquium crisis mapping Crowdsourcing data quality disaster DisasterMapping GeoNet.MRN GIScience heigit HOT humanitarian Humanitarian OpenStreetMap team intrinsic quality analysis landuse laser scanning Lidar Mapathon MapSwipe MissingMaps Missing Maps ohsome ohsome example Open data openrouteservice OpenStreetMap OSM OSM History Analytics OSMlanduse Quality quality analysis remote sensing routing social media spatial analysis Teaching terrestrial laser scanning Twitter VGI Wheelchair Navigation Workshop
  • Archives

    • January 2021
    • December 2020
    • November 2020
    • October 2020
    • September 2020
    • August 2020
    • July 2020
    • June 2020
    • May 2020
    • April 2020
    • March 2020
    • February 2020
    • January 2020
    • December 2019
    • November 2019
    • October 2019
    • September 2019
    • August 2019
    • July 2019
    • June 2019
    • May 2019
    • April 2019
    • March 2019
    • February 2019
    • January 2019
    • December 2018
    • November 2018
    • October 2018
    • September 2018
    • August 2018
    • July 2018
    • June 2018
    • May 2018
    • April 2018
    • March 2018
    • February 2018
    • January 2018
    • December 2017
    • November 2017
    • October 2017
    • September 2017
    • August 2017
    • July 2017
    • June 2017
    • May 2017
    • April 2017
    • March 2017
    • February 2017
    • January 2017
    • December 2016
    • November 2016
    • October 2016
    • September 2016
    • August 2016
    • July 2016
    • June 2016
    • May 2016
    • April 2016
    • March 2016
    • February 2016
    • January 2016
    • December 2015
    • November 2015
    • October 2015
    • September 2015
    • August 2015
    • July 2015
    • June 2015
    • May 2015
    • April 2015
    • March 2015
    • February 2015
    • January 2015
    • December 2014
    • November 2014
    • October 2014
    • September 2014
    • August 2014
    • July 2014
    • June 2014
    • May 2014
    • April 2014
    • March 2014
    • February 2014
    • January 2014
    • December 2013
    • November 2013
    • October 2013
    • September 2013
    • August 2013
    • July 2013
    • June 2013
    • May 2013
    • April 2013
  •  

    July 2020
    M T W T F S S
    « Jun   Aug »
     12345
    6789101112
    13141516171819
    20212223242526
    2728293031  
  • Recent Comments

    GIScience News Blog CC by-nc-sa Some Rights Reserved.

    Free WordPress Themes | Fresh WordPress Themes