Commit b172080b authored by Paolo Angelelli's avatar Paolo Angelelli
Browse files

Fix GeoProjectionWebMercator and MapPolyline incorrect projection


This patch fixes rendering artifacts with polylines appearing
when rendering large polylines and/or at high zoom levels.

Two problems caused the artifacts:
1.A too close near plane when calculating the projectable region in
  QGeoProjectionWebMercator, which presumably introduced numerical
  errors when then using such a region to clip data to be projected
  using a projection transformation based on the same frustum.
2.Projected polylines too large for qTriangulatingStroker, that would
  then introduce artifacts at screen.

To solve 1., as a temporary solution, the distance of the near plane has
been increased to a value that seems safe for zoom levels < 19.
This while a better formula that scales further is being researched.

To solve 2., screen-space line clipping has been brought back from 5.8,
and added on top of mercator-space clipping. This, in theory, should
also increase the performance, allowing qTriangulatingStroker to process
less data.

Task-number: QTBUG-71607
Change-Id: Id774419dde819931e2fdd78b02081695a91302ef
Reviewed-by: default avatarEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Showing with 135 additions and 5 deletions
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment