Bug report #154

Zoom to selected does not work with POINT Layer

Added by Redmine Admin over 15 years ago. Updated about 12 years ago.

Status:Closed
Priority:Low
Assignee:Gavin Macaulay -
Category:Data Provider
Affected QGIS version: Regression?:No
Operating System:RedHat Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:10213

Description

Zoom to selected does not work with POINT Layer

History

#1 Updated by anonymous - over 15 years ago

Works for me, except that selecting just one point and then zooming to selection results in a very zoomed out map.

#2 Updated by Gavin Macaulay - over 15 years ago

Zoom to selection for a single point now does something more sensible (SVN 57a21ca7 (SVN r5539)). Not sure if this will fix this ticket. If not, can we have some more detail on how it doesn't work?

#3 Updated by Redmine Admin over 15 years ago

Now it works but the selected point will be shown in a very very large scale. I think the best way to zoom to one selected point is to keep the actual scale of the view. So you can choice your prefered scale in case of one selected point. If you select more than one point QGIS have to decide whether or not to change the scale depending on the spatial distribution of the selected points.

#4 Updated by Gavin Macaulay - over 15 years ago

Sounds like a reasonable solution to let the user decide whether to zoom in to a very large scale or to zoom to a predefined scale for single points, although I'm not sure how easy it would be to do in qgis (the scale is sort of worked out as an afterthought).

#5 Updated by Gavin Macaulay - over 15 years ago

After some more thought, I think the problem (and solution) comes down to: what does the user expect when zooming into selected features?

For me, I expect the view to be zoomed so that the selected features fill the map. With a single point, this expectation can't hold in the same way that it does for features with some spatial extent.

I would be surprised (at qgis) if the zoom to a single selected point gave a view with lots of other, unselected, points. So my expectation is that the zoom should be sufficient so that only the selected point is visible, and the very large scale is just a minor side-effect of that.

Comments?

#6 Updated by Redmine Admin over 15 years ago

I would be surprised (at qgis) if the zoom to a single selected point gave a view with
lots of other, unselected, points.

In fact you will zoom to an infinite scale in case of point zooming, due to points are dimensionless. This is the actual behavior of QGIS. In my opinion it is unsatisfying. Thus I'll come back to my further statement. I think that higlighting of the selected point with respect to the actual mapscale is a better solution.

#7 Updated by Gavin Macaulay - over 15 years ago

  • Status changed from Open to Closed
  • Resolution set to fixed

Highlighting a point when the user choses to zoom to a single selected point would be inconsistent with how qgis works with multiple selected points, lines or polygons. At the moment, when zooming to a single selected point, qgis doesn't give an infinite scale, but rather does something that is sensible most of the time - it will zoom to give an extent of about 1e-8 of the existing extent. This works fine for all the cases that I have tried. In particular, if the point is close to (0,0), it will zoom to quite a high scale, but otherwise works fine.

I consider this behaviour to be reasonable in the face of an difficult situation, and bringing in an alternative behaviour depending on how many points one selects is likely to cause confusion to the users.

As it stands, the original defect no longer exists, so I'm closing this ticket. Having an alternative way of dealing with zooming to single points is, in my opinion, an enhancement that can be placed against Release 0.9 - feel free to submit a separate ticket if you think that this would be a desirable feature.

#8 Updated by Anonymous about 12 years ago

Milestone Version 0.8 deleted

Also available in: Atom PDF