Giter Club home page Giter Club logo

field-map-odk's Introduction

field-map-odk

Utilities to create ODK assets for field mapping

Users

Campaign managers

Campaign managers select an Area of Interest (AOI) and organize field mappers to go out and collect data. They need to:

  • Select an AOI polygon by creating a GeoJSON or by tracing a polygon in a Web map
  • Choose a task division scheme (number of features or area per task, and possibly variations on what features to use as the preffered splitting lines)
  • Provide specific instructions and guidance for field mappers on the project.
  • Provide a URL to a mobile-friendly Web page where field mappers can, from their mobile phone, select an task that is not already "checked out" (or possibly simply allocate areas to the field mappers).
  • See the status of tasks (open, "checked out", completed but not validated, requires rework, validated, etc) in the Web browser on their computer

Field mappers

Field mappers select (or are allocated) individual tasks within a project AOI and use ODK Collect to gather data in those areas. They need to:

  • Visit a mobile-friendly Web page where they can see available tasks on a map
  • Choose an area and launch ODK Collect with the form corresponding to their allocated area pre-loaded

Validators

Validators review the data collected by field mappers and assess its quality. If the data is good, the validators merge the portion of the data that belongs in OpenStreetMap to OSM. If it requires more work, the validators either fix it themselves (for minor stuff like spelling or capitalization mistakes that don't seem to be systematic) or inform the field mappers that they need to fix it. They need to:

  • Access completed data sets of "submissions" as Comma Separated Values and/or OSM XML so that they can review it.
  • Mark areas as validated or requiring rework
  • Communicate with field mappers if rework is necessary
  • Merge good-quality data into OSM (probably from JOSM).
  • Mark areas as completed and merged.

Info for developers

The basic setup here is:

ODK Collect

A mobile data collection tool that functions on almost all Android phones. Field mappers use ODK Collect to select features such as buildings or amenities, and fill out forms with survey questions to collect attributes or data about those features (normally at least some of these attributes are intended to become OSM tags associated with those features).

The ODK Collect app connects to a back-end server (in this case ODK Central), which provides the features to be mapped and the survey form definitions.

ODK Central server

An ODK Central server which functions as the back end for the field data collectors' ODK Collect apps on their Android phones. Devs must have access to an ODK Central server with a username and password granting admin credentials.

Here are the instructions for setting up an ODK Central server on Digital Ocean (it's very similar on AWS or whatever)

Field Mapping Tasking Manager Web App

The FMTM web app is a Python/Flask/Leaflet app that serves as a front end for the ODK Central server, using the ODK Central API to allocate specific areas/features to individual mappers, and receive their data submissions.

Manager Web Interface (with PC browser-friendlymap view)

A computer-screen-optimized web app that allows Campaign Managers to:

  • Select AOIs
  • Choose task-splitting schemes
  • Provide instructions and guidance specific to the project
  • View areas that are at various stages of completion
  • Provide a project-specific URL that field mappers can access from their mobile phones to select and map tasks.

FMTM back end

A back end that converts the project parameters entered by the Campaign Manager in the Manager Web Interface into a corresponding ODK Central project. Its functions include:

  • Convert the AOI into a bounding box and corresponding Overpass API query
  • Download (using the Overpass API) the OSM features that will be mapped in that bounding box (buildings and/or amenities) as well as the OSM line features that will be used as cutlines to subdivide the area
  • Trim the features within the bounding box but outside the AOI polygon
  • Convert the polygon features into centroid points (needed because ODK select from map doesn't yet deal with polygons; this is likely to change in the future but for now we'll work with points only)
  • Use line features as cutlines to create individual tasks (squares don't make sense for field mapping, neighborhoods delineated by large roads, watercourses, and railways do)
  • Split the AOI into those tasks based on parameters set in the Manager Web Interface (number of features or area per task, splitting strategy, etc).
  • Use the ODK Central API to create, on the associated ODK Central server:
    • A project for the whole AOI
    • One survey form for each split task (neighborhood)
      • This might require modifying the xlsforms (to update the version ID of the forms and change the name of the geography file being referred to). This is pretty straightforward using OpenPyXL, though we have to be careful to keep the location within the spreadsheet of these two items consistent.
    • GeoJSON feature collections for each form (the buildings/amenities or whatever)
    • An App User for each form, which in turn corresponds to a single task. When the ODK Collect app on a user's phone is configured to function as that App User, they have access to only the form and features/area of that task.
    • A set of QR Codes and/or configuration files/strings for ODK Collect, one for each App User

Field Mapper Web Interface (with mobile-friendly map view)

  • Ideally with a link that opens ODK Collect directly from the browser, but if that's hard, the fallback is downloading a QR code and importing it into ODK Collect.

field-map-odk's People

Contributors

ivangayton avatar krtonga avatar

Stargazers

Shoaib Burq avatar

Watchers

James Cloos avatar  avatar

Forkers

robsavoye

field-map-odk's Issues

Configure ODK Collect to use MapBox as default basemap

Basemap configuration in ODK Collect

To work well with Select from File (select from map) questions showing OSM data, it's better to have MapBox as the basemap. Google (the default basemap) doesn't match the OSM features (so a building centroid won't be obviously associated with the basemap building polygon) and the OSM layer breaks something. MapBox works.

The QR Code configuration for ODK Collect appears to reset most parameters. For example, if you configure ODK Collect with a QR code for one form, and modify the settings to use MapBox as the basemap, this only persists until you configure ODK Collect with a new QR code, at which point Google slinks back as the basemap.

It would be great if we could either:

  • Include a setting somewhere in the xlsform that sets the basemap
  • Instruct people how to set MapBox as the basemap in a persistent fashion

Get all geometry into PostGIS

PostGIS is more powerful than pygdal (or at least simpler, but also more powerful in the sense that from PostGIS you can use gdal/ogr commands but not vice versa).

We have the database called fmtm with user fmtm, but now we need to get GeoJSON files into it, and manipulate them from Python.

Web map showing work areas and QR codes

Mobile web map

Once an AOI has been created and split into multiple tasks, users need to visit a map view to choose an area to map.

For a prototype, a static Leaflet map may be sufficient. It should be mobile-friendly in terms of canvas and widget/element sizes; most field mappers are overwhelmingly likely to be accessing this via their phone.

Here are the example files for Mikocheni in Dar. It's four QR codes, corresponding to four GeoJSON files and their associated xlsforms. This GeoJSON file is the dumb grid that I used to split up the tasks.

Minimum Viable Prototype

  • A static Leaflet map that allows a user to click and view/download a QR code, which they will then use to configure ODK Collect.

Bonus items

  • User can see their own location on the map, which helps figure out what area to choose
  • Ability to actually launch ODK Collect by clicking on the link (along the lines of "Open this link with ODK Collect")
  • Areas turn grey/unclickable after being selected by someone (status becomes "checked out")
    • Obviously in a full product there would also be a way to "un-check out" an area (if you decided not to map it after all, or clicked the wrong one, or whatever), but that's not necessary for the demo on Friday September 9th

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.