Page MenuHomePhabricator

Kartographer geoline and geoshape services have low accuracy at medium-to-high zoom levels (for long or complicated features)
Open, LowPublic

Description

I've been doing some testing in my Commons userspace, as embedded maps are enabled on Commons. Using OSM data directly via the geoline service seems to result in low accuracy at medium-to-high zoom levels, at least for longer roads such as Great Northern Highway – see the comparison at commons:User:Evad37/sandbox/maps § Test 2: Great Northern Highway between the top map (generated from geoline service, actual result) and bottom map (actually generated from GeoJSON map data, but is the expected result for geoline service). Great Northern Highway isn't an isolated case, there are plenty of long roads that users will want to map when <mapframe> becomes available on Wikipedia, such as the U.S. interstate highways.

Event Timeline

Evad37 created this task.Jan 22 2017, 4:36 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 22 2017, 4:36 AM
Pikne added a subscriber: Pikne.EditedAug 20 2017, 11:20 AM

It seems that some sort of generalization algorithm is applied to all maplink/mapframe external data on Wikimedia side, including polygons of geoshape type, and for longer features it's just easier to spot. For example border segment of this object (Q990542) matches river curvature, but maplink/mapframe shows a zig-zag line that departs from river curvature (figure 1), unlike WIWOSM (figure 2). I hope this line generalization is not needed for performance reasons and can be dropped easily.

Figure 1: maplink/mapframe
Figure 2: WIWOSM

It looks particularly bad if I query neighbouring administrative boundaries and boundaries of different levels. Following example shows three lines that are boundaries for a municipality, a neighbouring municipality and one top level administrative entity, all generalized to different degree. These three lines should be the same line like here.

Evad37 renamed this task from Kartographer geoline service has low accuracy at high zoom levels (for long features) to Kartographer geoline and geoshape services have low accuracy at medium-to-high zoom levels (for long or complicated features).Sep 2 2018, 3:55 AM
Evad37 added a subscriber: Vogone.

Another example from the above merged task:

Comparing my test maplink (geoshape for France, Germany, Luxembourg, Belgium) and the OSM equivalent (for France) it becomes obvious that the shape of France is not being rendered in the maplink as it should be. For countries with less complex borders than France this issue does not seem to exist, hence this might be related.

Test maplink:

<maplink text="Test" width=300 height=300 zoom=8 latitude=50.073 longitude=4.554>
{
    "type": "ExternalData",
    "service": "geoshape",
    "ids": "Q142,Q183,Q32,Q31",
    "properties": {
      "fill": "#90ee90"
    }
}
</maplink>
Pikne added a comment.Oct 4 2018, 5:11 AM

If I'm not mistaken this was introduced in T138154. Based on that task it's unclear to me if or to what extent it was necessary to apply these generalization algorithms. Appropriate generalization largely depends on scale and the way data is used. Current one doesn't look fitting to me. Could someone please evaluate if it can be dropped or what would be better parameters for it. Maybe you can adjust it to generalize lines to lesser degree for greater scale (smaller zoom level)? Or, if it relates to significant performance issue, then maybe you can rather limit the number of objects or the size of data that can be retrieved at a time?

Mholloway triaged this task as Low priority.Oct 9 2018, 3:27 PM
Mholloway moved this task from Unsorted to Feature requests on the Maps (Kartographer) board.
mxn added a subscriber: mxn.Nov 10 2018, 10:00 PM