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

Multipoint layer problems - zoom to selection doesn't work; layer extent has wild values on editing #2

Open
m-kuhn opened this issue Apr 6, 2016 · 0 comments
Labels

Comments

@m-kuhn
Copy link
Owner

m-kuhn commented Apr 6, 2016

This issue has been migrated from the old QGIS issue tracker.

Vector layers of type Multipoint have the following problems:

  1. Zoom to selection doesn't do anything.
  2. When editing - adding or deleting points - the extent as shown in properties, Metadata goes to some wild values.

This causes zoom to layer extent to zoom to a very small scale, such that the scale bar on the map shows a distance on the order of 1e+200km

The points added are correctly positioned. Reloading the layer fixes the extents display.

some examples of the extents shown in Metadata (layer has a few points over about 1000m):

start:      xMin,yMin 499999,5e+06 : xMax,yMax 501001,5.001e+06

add point:  xMin,yMin 499999,-1.51934e-93 : Max,yMax2.95439e+202,5.001e+06

        xMin,yMin 499999,5e+06 : xMax,yMax 1.09228e+209,1.2796e+156

delete point:   xMin,yMin 4.94066e-324,-2 : xMax,yMax 4.94066e-324,2

I have tested with [[PostGIS]] and shapefiles.

Expected behaviors: Zoom to selection operates as it does for Points - a single point is displayed at a fairly large scale; multiple points should be displayed over most of the map view.

On add and delete points the extents should reflect the minimum/maximum of the locations of the layer.

Comments

Steven Mizuno:

I provide a patch for [[QgsGeometry]] to fix the above problems.

The details:

  1. have found in boundingBox() that an increment of ptr to the beginning of the point array was missing, so the points retrieved had wild values.
  2. and on a cursory inspection of the class I found in deleteVertext() that there is a missing break statement in the WKBMultiPoint case - there is a TODO note, but the case just fell through to the next, potentially causing odd problems.

Marco Hugentobler:

Applied in commit:d367081e (SVN r9754). thanks!
Still it would be good to implement the delete vertex method for multipoints.

Giovanni Manghi:

If the patch has already been applied can we close this ticket?

Steven Mizuno:

Yes, as the reported problem has been fixed.

@m-kuhn m-kuhn added the bug label Apr 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant