OpenStreetMap logo OpenStreetMap

Darkshredder's Diary

Recent diary entries

Nominatim Feedback Reporter - GSoC'21 Final Report

Posted by Darkshredder on 16 August 2021 in English. Last updated on 17 August 2021.

Source Code

Nominatim-Feedback-Reporter

Previous Posts

Hosted server

About the project

This is a Google Summer of Code project, which has been developed over the Summer of 2021 by Yash Srivastava (darkshredder). This project is mentored by Marc Tobias (mtmail) and Sarah Hoffmann (lonvia).

Project Description

OpenStreetMap’s main search engine Nominatim did not provide a way to report feedback on the search results that they think to be wrong.

This project aims to provide a web interface to report such feedback and store them in a logs file. So that the feedback can be analyzed, fixed and can be re-run by the maintainers to see if the problem is still there.

Implementation

The following step was followed to implement this project:

  • Selecting the frontend and backend framework for the project.
  • Finding a way to fetch multiple results for reverse geocoding as nominatim only returns a single result.
    • We used overpass API to fetch multiple results and then to provide an option to select a correct result base on reverse search results.
  • Hosting the frontend and backend code on the server.
    • Our frontend UI can be found here.
    • Our backend API can be found here.
  • Testing the frontend and backend code.
    • We used puppeteer and mocha to add integration tests to the frontend.
    • We used pytest for unit testing backend code.
  • Setting up the continuous integration pipeline.
    • We used GitHub Actions to integrate the CI pipeline to test as well as build our frontend and backend code.

Final product at the end of the GSoC

After phase-1 was completed, I along with my mentors had a discussion about the flow of the web interface and we decided to change some of the screens to make it more user friendly.

The screenshots below show the final product of the project.

Now we have a review page for all the feedback that was reported.

What did I learn?

  • Worked on completely new frameworks and how to adapt to them.
  • How to add testing to the project.
  • Worked on integrating CI pipeline where I ran backend as a daemon process and frontend ran tests and stored all the logs files in the backend.
  • Working and hosting APIs and frontend code on the server. This was the first time I worked integrating certbot to enable HTTPS on our website.

What next?

  • UI can be made user friendly.
  • Currently overpass API fetch only data that has name tag. So we need to add a checkbox that will fetch all the data rather than only name tag. ISSUE: #3
  • Whole application can be dockerized.
  • Accessibility features can be added.

Acknowledgement

I would like to thank my mentors Marc Tobias and Sarah Hoffmann for helping and guiding me in the project throughout the GSoC journey!

I am thankful to Google Summer Of Code for providing me with an opportunity to work with OpenStreetMap.

Location: Vijyant Khand, Chinhat, Lucknow, Uttar Pradesh, India

Nominatim Feedback Reporter - GSoC'21 Phase-1 Progress

Posted by Darkshredder on 18 July 2021 in English. Last updated on 17 August 2021.

Hello everyone! In my previous diary entry, I discussed a brief of my project. Now, as the first phase is over, I would like to make an update of my project, “Nominatim Feedback Reporter”, which is under development.

Source Code

The source code can be found in the following GitHub repository: https://github.com/darkshredder/nominatim-feedback-reporter/ It also contains a README.md file for the instructions to install the project for local setup.

Server is Online

We have a development server up and running, which contains the following things:

  • The feedback interface, which is the main project, can be found here: https://gsoc2021-feedback.nominatim.org/feedback/.
  • The OSM data imported through Nominatim is only for India and is not regularly updated. Currently, it contains data from 20-05-2021.
  • Using the reverse-search method for reporting feedback can show data outside India as it uses Overpass API, which contains whole planet OSM data.
  • As it is a development server, feedbacks are being stored but will be deleted later.
  • We regularly update the UI as the code is evolving, so don’t forget to refresh your browser’s cache.

More about the code

In this section, I will talk more about the code, how it is structured and implemented.

Frontend

We are currently using svelte as a frontend framework. The code structure is as below: Frontend code stucture We use component-based code structure for reusability, Bootstrap for layout styling, Leaflet for map interaction, Mocha to run tests. We have added integration tests to thoroughly test the flow of our website rather than unit testing for mainly testing the UI components.

Here are some screenshots from the UI we have made up to now. It still needs some tweaking of the wordings and changes in UI/UX.

As there are a lot of pages for the flow of the website. I would recommend trying it out from here: https://gsoc2021-feedback.nominatim.org/feedback/

Backend

We are using Falcon as our backend framework for creating API. The code structure is based on MVC architecture, although we are not using models as our data are stored in log files in YAML format instead of databases. The code structure is as below: For testing our backend, we are unit tests through pytest.

The example of the file stored in YAML format can be found as below:

What Next?

Here is a list of things that need to be done in the second part of this project:

  • Enhancing the UI/UX of the website.
  • Fixing any issues or bugs in the website.
  • Increasing the coverage of tests.
  • Work on the stretch goals as discussed in my previous post.

Acknowledgements

I want to express my gratitude to my mentors: Marc Tobias (mtmail) and Sarah Hoffmann (lonvia) who helped me throughout the process. We had weekly calls for discussing the entire flow of the website and project progress. I would also like to give my special thanks to Marc Tobias for providing me with the right direction for every week through a proper timeline and helping me set up the development server, which accelerated progress through quick feedback.

Location: Vijyant Khand, Chinhat, Lucknow, Uttar Pradesh, India

About Me

I am Yash Srivastava, an undergraduate student from the Indian Institute of Technology at Roorkee in Uttarakhand, India. I usually spend my time exploring different technologies and creating various projects.

Apart from development, I enjoy solving rubix’s cubes, reading books, watching anime. I also love adventure sports and travelling to different places.

Journey to OSM

I was working on creating a website for my college society where we needed to integrate a map to find the location of our college society.

At first, I tried with Google Maps integration, but the location was not found there and integrating it also required some API keys, which involved more work. Later while searching for alternatives, I found out about OpenStreetMap and how we can integrate it with our website and make changes to its database in a hassle-free way.

GSoC Project: Interface for reporting search bugs for Nominatim

The project proposal can be found here

Currently, there is no standard platform where users can report geocoding bugs or send feedback. Generally, if a user wants to give feedback or report a bug, one has to have a GitHub account and then create an issue that is not feasible. Thus we aim to create an Interface for reporting search bugs for Nominatim.

It will have the following project goals:

  1. The interface will be mobile-friendly.

  2. The backend will store log files for the reported bugs.

  3. Test suit will be created and iterated parallel to both frontend and backend.

Since this year GSoC has a shorter period thus we will have the following stretch goals:

  1. We will be adding a python script that will export log files to a CSV format that can be processed through Geocode-Tester to recheck the reported bugs.

  2. Dockerizing the whole application for the portability of code.

  3. Creating a Continous Integration pipeline using GitHub-Actions.

  4. Adding internationalization support.

That’s pretty much it. I will keep adding diary entries and keep everyone updated. If you have any questions about feel free to comment below. Thanks!

Location: Vijyant Khand, Chinhat, Lucknow, Uttar Pradesh, India