Page MenuHomePhabricator

Proposal : Design and implement a tool to create overlays on pre-rendered offline maps for Internet In A Box
Closed, ResolvedPublic



Name : Swapnil Sinha
IRC nickname on Freenode : swapnil-sinha
Github Profile :
Email :
Location (country or state) : Ranchi, India
Time Zone : UTC +05:30
Typical working hours (include your timezone) : 5 PM to 1 AM (UTC +5:30)


The Internet In A Box is a platform to provide offline access to educational content like Wikipedia slices, medical knowledge, videos, books, maps to users who have limited to no access to the Internet via physical media. One of its core features includes the ability to render offline maps of a selected region based on a user’s preference. This project aims to develop functionality to display an overlay of local information like medical facilities, disease outbreaks, important properties, etc. This can enhance the readability of the map for the user and provide useful information in times of need for them.

Mentor(s) - @Tim-moody , @psinghal20
Co-Mentor - @Georgejhunt
Have you contacted your mentors already? Yes


Untitled Diagram.png (361×741 px, 44 KB)


May 4 - June 1Community bonding period. Setup development environment and study various tools and techniques of the existing codebase.
June 1 - June 9Develop a minimum of three SPARQL queries to generate sample map features to test on online maps. Determine the best file format for storing the extracted geo data onto local storage for rendering on offline maps.
June 10 - June 19Extract sample geo data to the development environment for display as an overlay. Develop a javascript functionality to render map functions in extracted geo data as dynamic overlays on prerendered map tiles.
June 20 - June 28Finalize a working prototype that can render any arbitrary file of geodata as an overlay onto the existing OSM display in IIAB.
June 29 - July 3Phase 1 Evaluations
July 3 - July 12Design and implement tools to enable the users to do SPARQL queries themselves and implement a feature to move it to local storage. Implement more robust functionality by developing scripts to use existing APIs and tools to design a user-oriented approach. Develop scripts for the client-side to submit a SPARQL query( for power users).
July 13 - July 26Download query results to server similar to phase 1. Decide on choosing between queries or results to put in the catalog. Functionality to merge any new results about existing overlay data already on the server. Check for the impact of this addition on map search. Write detailed documentation for design and feature additions. Write a blog post regarding the changes.
July 27 - July 31Phase 2 Evaluation
August 1 - 7Add functionality to Admin Console UI to select from a list of pre-determined SPARQL queries and download resulting geodata to the server. Implement additional features based on feedback received.
August 8 - August 18Create Admin Console UI to allow input of query text by the user, developed independently on the WikiData web site and extract resulting data to the server on local storage. Then render the existing OSMs with an overlay of the query.
August 19 - August 23(Optional- Work on configuring ansible for the completed project). Run tests, bug fixes and write documentation for overall design strategy. Do code cleanup for final submission. Update blog with recent additions.
August 24 - August 31Final submission of code. Write Project Summary.
August 31 - September 7Mentors submit final student evaluations
September 8Final results of Google Summer of Code 2020 announced


  • A tool-chain allowing users to make their own Wikidata queries for map features and move it to local storage for rendering to offline maps.
  • A script to render map features in extracted geo data, stored offline in a file, as a dynamic overlay on map tiles.
  • Admin Console UI to enable the user to choose from a catalog of URLs that contain features or generate their own query using SPARQL and download it to local storage
  • Proper documentation at all phases indicating the design strategies used.
  • Identify areas of improvement and continue working on the project.

    Phase 1: Prototype
  • Develop a set of at least three SPARQL queries as sample map features.
  • Develop functionality to download the query into a suitable file format( preferably geojson) and extract this geodata in the development environment.
  • Implement Javascript to render map functions from extracted geo data as dynamic overlays on pre-rendered offline maps.
  • Finalize a working prototype that can take in a file of geodata(preferably by drag and drop) and renders it as an overlay on an OSM map.
  • Documentation for feature additions.

    Phase 2: Start Automation
  • Develop scripts to take in a user-submitted SPARQL query, and not sample query data.
  • Implement the functionality to merge newer results onto existing overlay data. Check conflicts with the content search feature.
  • Improvise based on feedback received.

    Phase 3: Stretch Goal: Add Admin Console Gui and Automation.
  • Add Admin Console UI for users to select from a dropdown of available overlays.
  • Add functionality for power users to generate their own query data file and store it to local storage for rendering as an overlay by the server.
  • Complete Documentation of every feature addition, bug fixes.


  • I will be working on the GitHub repo for IIAB Maps ( on a separate development branch. The code will be uploaded on my development branch periodically. I will keep creating Pull Requests for every feature added into the main repo.
  • For transparent communication, I will be online on Zulipchat during working hours from 5 PM to 1 AM (UTC 05:30).
  • I will use Github Projects for managing tasks and updates on the project.
  • I will be available on email( to be contacted when needed in the non-working hours.
  • According to WMF norms for Google Summer of Code students, I will submit periodic blogposts to the Bi-Weekly Reports page.
  • I will publish the final summary of my work at the end of my coding period on my blog.

About Me

Currently, I am a sophomore studying B.Tech in Computer Science Engineering at Birla Institute of Technology, Mesra. I was introduced to open-source by a senior in my freshman year and since then I’ve been hooked. I have been doing Web Development for quite some time now. I’ve always had this passion for building things from scratch. Passion coupled with discipline can get one all the success one wants, is what I believe.

With the current delay in college sessions, there might be a change in my college timetable.I will communicate the changes, when necessary.

With contributions in small open-source projects and participation in a few community hackathons, I’m quite adept with open source technologies (like git, IRC, etc.). This year, with GSoC, it’ll be my first big project in the domain of open source.

In due course of exploring what the project is really about, I’ve begun to appreciate the concept of connecting people with the Internet for access to information, even more. With the current situation forcing us into self-isolation, a project like Internet In A Box really becomes the torchbearer for connecting people and ideas who do not have the luxury of a decent Internet connection at their disposal, and I would love to be a part in taking this project further with better and robust features.

Past Experience

I have experience in working with C++, Java, Python, HTML, CSS, Javascript among others. Among databases, I mostly worked on MySQL and for VCS, I’ve considerable experience working with git. I have experience in building web applications with Django, making production-ready databases with PostgreSQL.

I’ve participated in a few hackathons in the past and just recently, was selected for a hackathon to build solutions with containment strategies for people suffering from CoVID-19.

I have been a part of a few tech conferences, and have taken workshops on Git, Github and Web development in general.

Microtasks Completed

Event Timeline

@Tim-moody ,@Georgejhunt , @psinghal20 , this is my first draft for the proposal for GSoC 2020. Please provide your valuable feedback.

Synopsis is good.

Deliverables (adjust timeline accordingly):

There is no Admin Console in phase I. The tasks are creating the wikidata queries, extracting the data to a format for local storage perhaps using, and rendering the overlays for a fixed set of sample map features. This should be part of a prototype that works with the IIAB OSM code enhancements currently under development. Deployment to the IIAB server is just through a script-based cli. I would treat the catalog in this case is a list of urls containing the data and not the data itself.

In phase II you will design and implement a tool chain that will allow a user to take the result of a SPARQL query and move it to a local file of the same format as that in phase I such that it can be rendered as an overlay.

I think phase III is a stretch goal to to integrate the catalog with the admin console.

In each phase there will be a documented design strategy that will be part of the deliverables.

Hopefully we can speak tomorrow to refine this so that you are in a position to prepare a final pdf by the Mar 31 18:00 UTC deadline.

In terms of git repo, I think you will want to fork and contribute your code to it as PRs from time to time.

I like Tim's restatement of the 2 phases. I'd add the following:

Phase I is learning to get the data and display the data on a map by hand. Maybe the queries from wiki data can be frozen into intermediate files which are chosen for display on the map.
The deliverable in phase I is a set of files that can be dropped on IIAB map for display.

On a parallel track, phase I should start to develop openlayers skills, simple online maps, and then doing the same offline (often more difficult). I found the openlayers tutorial very useful.

Phase II may require writing additional javascript code to display popups of geodata. Perhaps the tool chain generates a json catalog, which is consumed by the Admin Console, or a simple script which does menu driven "wget"s.

@swapnil-sinha Hi! Thanks for your proposal. I have a comment - your proposal is currently missing a list of small tasks in Wikimedia projects that you contributed to during the application phase. See step 8 here If you did, please add them in your proposal. Thank you!

Thank you so much @Tim-moody, @Georgejhunt , @srishakatux for your valuable feedback.

Yes @srishakatux , I'll add that right away.

@srishakatux Any further questions, comments, or issues?

Here is what I am thinking at the moment. It needs to be validated during the phase I design:


  • SPARQL query to select geo data for desired map features from WikiData
  • Geo data results of executing the query
  • Local file on server of exported Geo data results, possibly in geojson format
  • Javascript code renders those map features as overlay to pre-rendered map tiles in IIAB. This includes showing icons and labels


Phase I - Prototype

  • Develop set of SPARQL queries (minimum three)
  • Determine best file format for extracted geo data
  • Extract sample geo data to development environment
  • Develop javascript to render map features in extracted geo data as dynamic overlay on prerendered map tiles
  • Deliverable is a working prototype that can render an arbitrary file of geo data as an overlay onto the existing OSM display in IIAB

Phase II – Start Automation

  • Finalize prototype
  • Develop scripts to use existing APIs to:
    • Submit a SPARQL query
    • Allow substitution values in query such as for location on which centralized
    • Download query results to server
    • (decide whether to catalog queries or results, probably the former)
    • Merge new results with any overlay data already on the server
  • Is there an impact on map search?

Phase III – Stretch Goal: Add Admin Console Gui and Automation

  • Create Admin Console UI to select from list of pre-determined SPARQL queries and download resulting geo data to server
  • Create Admin Console UI to allow input of query text, developed independently on the WikiData web site and extract resulting data to server

Thank you so much @Tim-moody for your valuable feedback.
I have made necessary revisions to the proposal.
@Tim-moody , @Georgejhunt , @psinghal20 , I will be very grateful to you if you can review this proposal once more and provide any other valuable suggestions you have in mind.

In deliverables you need to mention the javascript to overlay the map features from wikidata onto the prerendered map tiles, which will be part of phase I and is a major part of the project.

Okay @Tim-moody .

Thank you so much @Tim-moody , @Georgejhunt , @psinghal20 for your valuable feedback. I will be making the final submission for the proposal. Looking forward to a great learning experience.

Google-Summer-of-Code (2020) is over! I believe you have already documented your project here If not, I would encourage you to do so. Also, is there anything else remaining in this task to address? If not, please consider closing this task as resolved.