mpetroff / qgsazimuth

Fork of http://sourceforge.net/projects/qgsazimuth/
7 stars 3 forks source link

"Capture From Map" coordinates are offset #2

Closed darrencope closed 10 years ago

darrencope commented 10 years ago

When capturing starting vertex coordinates from the map using the "Capture From Map" button, the resulting feature is always offset from the point clicked. This tool should place the starting point where the map is clicked, and ideally also respect QGIS Snapping settings to ensure topological validity.

mpetroff commented 10 years ago

How large an offset are you talking about? I thought I had mostly fixed that bug already. If the offset is small, I just committed a change that should fix it by setting the cursor's hot spot to the top left where the arrow points instead of the center of the cursor where it previously was.

darrencope commented 10 years ago

Matthew; yes, it does look like that's the problem. The difference does appear to be from approximately the centre of the cursor to the top left-hand tip where I click. Also, for some reason the map always zooms in slightly when clicking to select a point.

Are there any plans to support QGIS snapping settings, so that the start point will actually start where it should (e.g. on a vertex of an existing feature?)

mpetroff commented 10 years ago

The code should already support QGIS snapping settings. As for the map zooming in slightly, I've never had that happen. I'm marking this issue as closed since I fixed the offset issue in e13f71e92e2cd0142c7df9012308101fdd535650.

darrencope commented 10 years ago

Thanks Matthew; when will these changes get pushed to the plugin repository?

mpetroff commented 10 years ago

I just uploaded a new version. It will get pushed once the new version is approved.

darrencope commented 10 years ago

Hi Matthew,

Still experiencing an issue with this - I don't think the coordinates are 'offset' now, but it is clearly still not respecting the snapping tolerances. To reproduce, have a polygon layer in your map. Ensure snapping to vertex is set with a reasonable tolerance. Use "Capture from map" to obtain the starting vertex by clicking very close (within the tolerance) of an existing vertex. The issues:

Firstly: the map zooms upon click, which it should not do when selecting a starting vertex Secondly: the starting point is not snapped to the vertex. It DOES seem to be showing where the click occurred now (rather than offset to center of cursor) but still not the desired behavior.

mpetroff commented 10 years ago

I can't reproduce the behavior. I've never had the map zoom in, and snapping works on my machine.

darrencope commented 10 years ago

Matthew - interesting. I'm on Windows, using the OSGeo4W packages. The 'stable' 32-bit Dufour 2.0.1 version works properly, as expected. The 64-bit nightly build zooms/pans on clicking the map to set the starting vertex. I guess I'll stick with the stable version for now, but perhaps that will let you track down the issue?