Add geometry simplification to MapPolyline/MapPolylineObjectQSG


This change introduces a metric-based implementation of the
Ramer-Douglas-Peucker line simplification algorithm to generate a
LOD pyramid for the polyline geometries.

This comes with a related property (in MapItemBase), lodThreshold,
that can be used to change the threshold after which no simplification
will be used.

By default the value of this property is 0, meaning that the
behavior will be unchanged and no LOD will be used.

This change also introduces LOD on map polyine objects QSG, for which
no property is introduced, and there's a default threshold set to
zoom level 12 (which appear to produce acceptable results).

Finally, this patch makes use of a threadpool with 1 thread
to enqueue geometry simplification tasks, which would otherwise
freeze the UI when computing for the first time.

Support for geometry simplification is currently added only to polylines.
It might be of interest extending it to polygons as well, once
a proper strategy for handling the simplification of inner holes has
been identified.

Finally, extending it to circles could be of interest, while potentially
bringing only minor benefits, as circle geometries are currently fixed
to 128 vertices.

Also adds a MapObject-based delegate to the geojson viewer example.

Task-number: QTBUG-46652
Task-number: QTBUG-38459
Task-number: QTBUG-49303
Change-Id: I64b5db4577962db17e5388812909285c9356ef0d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
commitbe7cbed7411d024d178377bd327d5916c80e02a0
parenta4469cad4041f21e640efa9ca5d0b192dd702955
authorPaolo Angelelli <paolo.angelelli.qt@gmail.com>
committerPaolo Angelelli <paolo.angelelli.qt@gmail.com>
commit timeWed, 12 Feb 2020 11:24:45 +0000