[QGIS-Developer] Geodesic Move, Rotate, and Interactive Shape Digitizing
adenaculture at gmail.com
Tue Oct 2 08:27:07 PDT 2018
My next project with Shape Tools is to add a geodesic move and rotate tools
as well as interactive geodesic shape creation of the existing Shape Tools
Normally I would start with QgsMapTool class and work from there, but QGIS
3 seems to have implemented a nice node and outline with the Shape
Digitizing Tools. Can I hook into that work? For shape creating what I
would like to do is to click and release on the map and as the cursor moves
calculate the geodesc shapes based on the geodesic distance from the
clicked point and the current cursor point. Once I click again then the
shape is created. For some of the shapes I would need a popup window to
adjust one or two parameters. During the highlight mode, after each motion
even, I would need to update all the node positions based on the current
geodesic distances and bearings.
The reason for geodesic move and rotate tools is because the current one
works with the local layer units and if that happens to be degrees strange
results happen. With the new geodesic move and rotate tools I would like to
be able to select the shape like the current tools do, calculate the
centroid and then move and rotate each vertex according to geodesic
I could do all this just with working with the QgsMapTool class, but I
would prefer trying to hook into the existing shape drawing API as it would
provide the same look and feel. It looks like there are the following
classes: QgsMapToolCapture, QgsMapToolAdvancedDigitizing, QgsMapToolEdit.
Which should I use? I need full control of each node after each cursor move.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the QGIS-Developer