Skip to content

Layers - Pitch #2461

@westnordost

Description

@westnordost

Idea

The idea is to make available a tool that makes contributing and maintaining data easy and efficient to do on a survey, focussing on one aspect of the map at a time.

Consideration

On the smartphone, there are three issues that further challenge usability:

  • a small screen severely limits the number of things that can be displayed at once
  • a fat finger as pointing device is not only much less precise than a computer mouse, the same finger obscures part of the screen, most importantly the part where the tap (or drag) happens
  • the user is currently out and about

StreetComplete is so easy and quick to use, because amongst other things, it severely limits what data the user can see and change.
The usability of "fully-featured" editors like iD, JOSM and Vespucci all suffer from that the data they work with is so complex, as they show all of it at the same time. New mappers, especially from GIS backgrounds are often surprised that there is no inherent concept of layers in OpenStreetMap.

For mappers who want to map/update "everything" on a survey, there is and there will probably never be a more efficient method than taking a lot of photos (or for mapillary) and then adding all the info visible on the photos to the map via JOSM.

The target audience for this idea are mappers who want to focus on completing and keeping up-to-date one aspect of OpenStreetMap efficiently at a time, i.e. per survey.

This requires the app to be able to

  • show the current data in an uncluttered and clear form to the user, only that "layer"
  • and the ability to add/update this data quickly and easily so that it can be done on the go without stopping and so that subsequent data entry at the computer at home is not necessary

Rough UI Concept

The UI / and input form can and should be customized for each layer as long as it enhances the overview and makes the input easier.

Untitled
Untitled3
Untitled2

  1. the background map should probably be desaturated. No quests are displayed. At least, the data for the layer must stand out in (flashy) colors.
  2. the legend lists what each color stands for. Ideally, this should be retractable into a tappable icon, maybe have it expanded every time one enters this layer
  3. selection is highlighted in some way. Maybe like in iD (yellow glow) or maybe as if it is floating above the map (shadow).
  4. the show/edit form for the selected element. Maybe always show this section - empty or with a hint if nothing is selected to reduce jarring motions during usage, like in JOSM
  5. for layers where new (POIs) can be added, maybe this UI: display a huge crosshair which marks the point where a new point is added after pressing the (+) button.

Switching to this other part of the app would be possible through the main menu. It would lead to a list of available layers, one can select a layer, that list slides to the left to reveal the map with the appropriate layer.

Colors

For all the layers, there should be a consistent color scheme at least for "no" and "not specified yet". I am thinking, it should be...

  • transparent or grey for "no"/"N/A", f.e. not lit, no cycleway, ...
  • red for "not specified yet"
    ... because missing data should stand out, rather than data where a particular feature does not exist

Possibilities

I did some prototyping with Tangram and found out that:

  1. it is not possible to display textures (reasonably) on ways. So this means, there can't be any graphics for the lane count, the different cycleway options etc onto the street ways. It's colors (, widths, dashing-patterns, outlines) only
  2. it would be possible to have repeating graphics on the ways, much like the oneway-arrows. This might replace a legend.
  3. It is possible to display lines on the left and on the right side of ways

Too bad for point 1, so the display will be less fancy. However, this means it could maybe be streamlined so that it is easier to add new layers.

Layers

Why layers at all, if focussed contribution and maintenance is already possible with the quest system? One can simply deactivate all quests except ones where one wants to do the survey (f.e. only cycleway quests). Well:
For some data, it is necessary to see the big picture in order to be able to fill in the blanks and/or notice that certain data is outdated. A good example are housenumbers, POIs (a shop is missing / wrong name). For some others, the big picture is necessary because the data is part of a connected network: A good example are speed limits and specifically slow zones, lit ways and paths, cycleway infrastructure etc.

So, there are at least two additional prerequisites for layers:

  1. use where the big picture / surrounding data of the same type is necessary or at least very helpful
  2. use for data that can only be recorded or is best recorded on-site - because this app is to be used on a survey

Layer ideas

Certainly there are many more, just covering the most valued ones.

These are the most important because these are things that can only be effectively recorded on-site:

  1. Addresses: Edit street and housenumber of addresses and add new addresses efficiently. Unclear how the street address part could be made efficient.
  2. POIs: Show and let the user add/edit POIs (shops, amenities, ...) types and maybe names with the help of the id presets
  3. Maxspeed: While quite important, I wouldn't want to touch this with the current prevalent tagging scheme(s). Difficulty here is that two types of infos should be displayed at the same time
  4. Lit: Might be a candidate for the first layer because it is the layer with the least caveats I'd think
  5. Smoothness: Important to see the big picture here to put what is "good" smoothness etc. into context

This is less important because while they can often only be effectively recorded on-site, it is not necessary to see the big picture:
6. Surface

These are also less important because while it might be very helpful to see the big picture, they do not necessarily need to be recorded on-site:
7. Cycleway infrastructure: Edit cycleway availability on roads or mark them as cycleway=separate, maybe edit whether sidepaths allow cyclists/have cycle tracks. There are many open ends here, one could also allow changing classification of roads to/from bicycle roads, show and allow to add bicycle stand POIs etc, though it is better to start as limited as possible.
8. Sidewalks: Same as cycleway infrastructure but certainly easier to do
9. Lanes: Difficult here to display it properly
10. Parking lanes

Technical

Now comes the hard part. The really really hard part. Thinking how the UI is best going to be is nice and dandy, but the technical part must work basically so different from the rest of the app that it could basically be another app.
This kind of edit mode would work more like a classic OpenStreetMap editor: Download data into memory, visualize and let the user edit that data, upload the changes at the end. StreetComplete doesn't do that at all at the moment. Here is a small excursion:

Current data flow

  1. Download: The app memorizes and persists to a local database which rectangles of the map have been downloaded already (more precisely: tiles at zoom level 16) DownloadedTilesDao. Whenever the user's position changes, it is checked whether the area he is in currently has already been downloaded. If not, it is. X days after an area has been downloaded, the app deliberately forgets that this area has been downloaded, so that a download is triggered again. This way, the app ensures that the data is refreshed every X days.
  2. Quest Creation: On each download, the data is analyzed for eligibility for all the quest types. The quests are created for all elements that are eligible to them.
  3. Persistence: Both the quests and all elements that are referenced by at least one quest are persisted into a local database. All other elements are discarded. So at this point, you can simply close the app and the quests will be there next time you open it. You may take this for granted already, but JOSM for example doesn't do that (automatically) - nothing is persisted unless you deliberately save it to disc.
  4. Quest display: The map view in turn also memorizes which rectangles of the map have been in view already. If the user scrolls over an area that haven't been in view already, that section is loaded from database and the quests therein added to the map.
  5. Quest solving: When a quest is solved, it is marked as solved and persisted to the database. The OSM element it refers to is not changed at all at this point, this is also in contrast to other OSM editors which work directly on that data. Instead, a kind of diff is created and persisted.
  6. Upload: On upload, the diff is applied to the persisted element fetched from the database, then uploaded - one element at a time. The updated element (from the server) is then persisted.

So what this means is, that the answers the user gives does not result in a change to the data, only after upload. This is okay, since that changed data is not shown anywhere. The downside that can already now be observed with this approach is that quests are not immediately (re)created after splitting a way (offline) and quests that conditionally follow after another quest has been answered are also not created until upload.

Required data flow

Above section in a nutshell: Downloaded OSM data is not changed until upload. This approach will not work for the layers as the user wants to see his change immediately, not after upload. Also, he'd want to immediately continue after splitting a way.

So, what is necessary is

  1. Download: at least also the elements used for any layer must also be persisted so that they are available offline.
  2. Persistence: They must be persisted in a way that allows efficient spatial access to them. In other words, they need to be sorted into a tiles raster. This touches upon Consider quest dependencies #2438 (comment) , some work done for the layers is the same work that would need to be done to remove the technical limitation that follow-up quests are not displayed until another download happens
  3. Display: The map view for the layers will work similarly to the map view for the quests (see point 4 in previous section), only that not the quests are loaded dynamically from database, but the OSM elements referenced by the layer definition
  4. Editing: To enable editing, the concept that the downloaded OSM element is not changed within the app must be broken. Still pondering how to do this... will probably involve having two versions of an (edited) element: The original downloaded version and the local version (=projected server version).
  5. Upload: I'd like to stick to the concept of keeping around diffs for each element and applying these diffs just before upload for automatic conflict resolution. So, the local edited version would likely only serve display purposes. However, there may be unknown complexities with the undo function here.

MVP

An MVP would be to have at least one layer available at all, reachable through the UI. Selecting and viewing the current data should work.
It would be very good if editing of this data also already works but it is not absolutely necessary for a first version.

It would be nice to have the layer definition in some kind of streamlined fashion so that it is easier to add new layers, but it is not necessary for a first version.
Specifically splitting ways and creating/deleting POIs would be a feature that would likely not be available from the start.

So, a good MVP should have basic editing capabilities, in a pinch online-only would do, but editing is simply necessary to see if this idea gets any followers. Both MapContrib and MapComplete, who have similar approaches, did not really lift off. So before sinking too much time into this idea, it would be best to get a rudimentary prototype going ASAP and then seeing how the idea is being embraced or not.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions