Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-rendered map display does not respect rotation #20119

Closed
qgib opened this issue Dec 23, 2014 · 16 comments
Closed

Pre-rendered map display does not respect rotation #20119

qgib opened this issue Dec 23, 2014 · 16 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Map and Legend Related to map or legend rendering
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented Dec 23, 2014

Author Name: Sandro Santilli (@strk)
Original Redmine Issue: 11909
Affected QGIS version: master
Redmine category:map_canvas
Assignee: Sandro Santilli


The map shown on zoom/pan events as a placeholder while renderer completes his work in a thread does not take rotation in consideration.
This means that a rotated map is placed in the wrong place until renderer completes, giving a "jumpy" effect to the experience.

See further discussion in issues #20035

One known problem is a limitation of the QgsMapCanvasItem interface which allows to set the position and size of an item by specifying its spatial extent (in map coordinate space) which tipically users obtain by asking for the "visible extent" of the MapCanvas. In presence of rotation, the upper-left corner of the visible extent is usually outside of the viewport.


@qgib
Copy link
Contributor Author

qgib commented Dec 23, 2014

Author Name: Mathieu Pellerin - nIRV (Mathieu Pellerin - nIRV)


IMO, this shouldn't be a feature request. It's an implementation issue. But that's all semantic :) it however would have to be dealt with before allowing for a status bar rotation box as for the average user, the visual jump is not a great experience.

@qgib
Copy link
Contributor Author

qgib commented Dec 23, 2014

Author Name: Nathan Woodrow (@NathanW2)


  • tracker_id was changed from 2 to 1
  • version was configured as 2.6.0
  • crashes_corrupts_data was configured as 0

@qgib
Copy link
Contributor Author

qgib commented Jan 2, 2015

Author Name: Sandro Santilli (@strk)


Work in progress here: #1749


  • version was changed from 2.6.0 to master

@qgib
Copy link
Contributor Author

qgib commented Jan 3, 2015

Author Name: Sandro Santilli (@strk)


Fixed with commit 888a9f0


  • resolution was changed from to fixed/implemented
  • status_id was changed from Open to Closed
  • done_ratio was changed from 0 to 100

@qgib
Copy link
Contributor Author

qgib commented Jan 3, 2015

Author Name: Mathieu Pellerin - nIRV (Mathieu Pellerin - nIRV)


Sandro, still not fixed for me, see video capture attached.

I've tried on three different projects, with OTF reprojection on and off, same result, the jumps are still there.


  • 8245 was configured as pan_rotated.mp4

@qgib
Copy link
Contributor Author

qgib commented Jan 3, 2015

Author Name: Mathieu Pellerin - nIRV (Mathieu Pellerin - nIRV)


Here's an ever better video, showing jumps with a simple project of two layers (the forest cover is quite a large dataset, ideal to witness the jump).

I noticed the actual incremental drawing of the forest cover polygons are drawn at the wrong location, until all of the layer is drawn.


  • 8246 was configured as pan_rotated_better.mp4

@qgib
Copy link
Contributor Author

qgib commented Jan 4, 2015

Author Name: Sandro Santilli (@strk)


The way I try to witness the jump is unchecking the "Renderer" checkbox and panning/zooming/rotating and finally re-check "Renderer" to verify the rendered map is at the same location as the pre-rendered one.

It works for me with a raster layer and two vector layers (postgis and memory).
Where does your forest cover comes from ?

@qgib
Copy link
Contributor Author

qgib commented Jan 4, 2015

Author Name: Sandro Santilli (@strk)


After obtaining the shapefile of the land cover I could still not reproduce.
My rendering options are: do not use rendere caching, do not use parallel layers rendering, map update interval: 250ms.
I confirm with "Render" unchecked everything looks fine, so the jump you see might be coming from a partial rendering event.

@qgib
Copy link
Contributor Author

qgib commented Jan 4, 2015

Author Name: Sandro Santilli (@strk)


I see it takes "Render layers in parallel using many CPU cores" to trigger the jumping. Do you confirm ?

@qgib
Copy link
Contributor Author

qgib commented Jan 4, 2015

Author Name: Sandro Santilli (@strk)


The problem is likely with the QgsMapCanvasMap (item) being updated on "rendererJobFinished" event which is "late".
Doesn't take any special layer to reproduce, can be done also with a simple one.
It needs rendering to be activated but shows only until it is not complete.
Martin, do you have any trick to make the "partial" rendering visible, avoiding a completion event ?

@qgib
Copy link
Contributor Author

qgib commented Jan 4, 2015

Author Name: Sandro Santilli (@strk)


Oh another thing: the "jump" can be made more visible with simple layers by reducing the "Map update interval" to 0ms (Options,Rendering) If the interval is larger than the time it takes to complete the rendering, no jump can be notable.

@qgib
Copy link
Contributor Author

qgib commented Jan 4, 2015

Author Name: Sandro Santilli (@strk)


Partial rendering fixed with commit 41da5c3
Mathieu please confirm

@qgib
Copy link
Contributor Author

qgib commented Jan 4, 2015

Author Name: Mathieu Pellerin - nIRV (Mathieu Pellerin - nIRV)


Sandro, excellent, progressive / partial rendering working just fine now. Huge step forward.

@qgib
Copy link
Contributor Author

qgib commented Mar 27, 2015

Author Name: Sandro Santilli (@strk)


I'm seeing the jump on partial/progressive rendering again, can anyone confirm ? Both in 2.8 branch and master

@qgib
Copy link
Contributor Author

qgib commented Mar 28, 2015

Author Name: Sandro Santilli (@strk)


10d2ce4 does not show the jump on progressive rendering, 3229813 does, Im' bisecting...


  • status_id was changed from Closed to Reopened

@qgib
Copy link
Contributor Author

qgib commented Mar 28, 2015

Author Name: Sandro Santilli (@strk)


Oops, sorry I just realized this is really not a regression. Jumping only happens on changing rotation, not scale or position.
If worth, it's better to use a separate ticket for this.


  • status_id was changed from Reopened to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Map and Legend Related to map or legend rendering labels May 25, 2019
@qgib qgib added this to the Version 2.8 milestone May 25, 2019
@qgib qgib closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Map and Legend Related to map or legend rendering
Projects
None yet
Development

No branches or pull requests

1 participant