diff options
author | Paolo Angelelli <paolo.angelelli.qt@gmail.com> | 2019-12-30 13:27:29 +0100 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli.qt@gmail.com> | 2020-02-12 11:24:45 +0000 |
commit | be7cbed7411d024d178377bd327d5916c80e02a0 (patch) | |
tree | d5840e89206157770188c4472bcc752f793a6a5d /examples/location/mapviewer/doc/images | |
parent | a4469cad4041f21e640efa9ca5d0b192dd702955 (diff) | |
download | qtlocation-be7cbed7411d024d178377bd327d5916c80e02a0.tar.gz |
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>
Diffstat (limited to 'examples/location/mapviewer/doc/images')
0 files changed, 0 insertions, 0 deletions