Discussion:
Show area of a polygon while editing with node tool
Michael Pfeiffer
2014-10-16 07:38:51 UTC
Permalink
Hi everybody,

I'm developing a python plugin.
Now the users of the plugin want to see the area of a polygon while editing
it with the node tool because they need to have polygons with a specific
area.
Means they move a node and the area changes while moving the node.
Is there an easy way to manage this? Are there already any examples?

Thx for your help

regards

Michael



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Show-area-of-a-polygon-while-editing-with-node-tool-tp5167750.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
Luigi Pirelli
2014-10-16 08:38:48 UTC
Permalink
you can always get the geometry from the rubber band with asGeometry()

http://qgis.org/api/classQgsRubberBand.html#aecb438a7c6e7c284d6a601d88985b66a

and calc the area.

Regards, Luigi Pirelli
Post by Michael Pfeiffer
Hi everybody,
I'm developing a python plugin.
Now the users of the plugin want to see the area of a polygon while editing
it with the node tool because they need to have polygons with a specific
area.
Means they move a node and the area changes while moving the node.
Is there an easy way to manage this? Are there already any examples?
Thx for your help
regards
Michael
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Show-area-of-a-polygon-while-editing-with-node-tool-tp5167750.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
_______________________________________________
Qgis-developer mailing list
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Junior
2014-10-16 10:56:32 UTC
Permalink
Hi
Isn't there already such plugin? I haven't used it yet but you can give a look to CalcArea plugin and see how it deals with that.

Envoyé depuis mon HTC

----- Reply message -----
De : "Michael Pfeiffer" <***@bd.so.ch>
Pour : <qgis-***@lists.osgeo.org>
Objet : [Qgis-developer] Show area of a polygon while editing with node tool
Date : jeu., oct. 16, 2014 09:38

Hi everybody,

I'm developing a python plugin.
Now the users of the plugin want to see the area of a polygon while editing
it with the node tool because they need to have polygons with a specific
area.
Means they move a node and the area changes while moving the node.
Is there an easy way to manage this? Are there already any examples?

Thx for your help

regards

Michael



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Show-area-of-a-polygon-while-editing-with-node-tool-tp5167750.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
Bernhard Ströbl
2014-10-16 11:21:48 UTC
Permalink
Hi,

just a question: are you trying to superimpose this on top of the
out-of-the-box node tool or are you planning on creating a new tool that
copies the node tool?

The first is not so simple I assume, the second either (plus it does not
make too much sense to rewrite core functionality in Python). Apart from
that I would be sceptical because with mouse moves the users will never
achieve their target area.

I see two possible solutions apart from making a plugin of your own:
1) label the polygon with its area; after a node is moved the label is
updated so users can approximate their desired target area.
2) try DigitizingTools plugin; there is a function to move a node or a
polygon side to achieve a target area. If you need other funtionality
there you are invited to contribute.

Bernhard
Post by Junior
Hi
Isn't there already such plugin? I haven't used it yet but you can give
a look to CalcArea plugin and see how it deals with that.
Envoyé depuis mon HTC
----- Reply message -----
Objet : [Qgis-developer] Show area of a polygon while editing with node tool
Date : jeu., oct. 16, 2014 09:38
Hi everybody,
I'm developing a python plugin.
Now the users of the plugin want to see the area of a polygon while editing
it with the node tool because they need to have polygons with a specific
area.
Means they move a node and the area changes while moving the node.
Is there an easy way to manage this? Are there already any examples?
Thx for your help
regards
Michael
__________ Information from ESET Mail Security, version of virus signature database 10572 (20141016) __________

The message was checked by ESET Mail Security.
http://www.eset.com
Michael Pfeiffer
2014-10-16 12:12:37 UTC
Permalink
Thx for your hints guys.
Indeed I thought about superimposing or creating a new tool that copies the
node tool.
But the plugins mentioned by Bernhard and Junior should be a good and much
easier solution as well.

Thank you for your help

regards

Michael




--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Re-Show-area-of-a-polygon-while-editing-with-node-tool-tp5167804p5167813.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
Loading...