<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
Hi Listers,<br>
I can't for the life of me work out the syntax/commands to use in
the FieldCalculator->FunctionEditor for extracting vertices.<br>
<br>
I have a Polygon layer with Multipolygon rectangles at various
rotations.<br>
I need to extract the 4 corner points so that I can calculate (and
save in a virtual layer) lines that I can later use with
"Processing->Split with lines".<br>
<br>
I will google for opening a new virtual layer and saving lines to
it, but if that is quick and easy then some help there would also be
welcome.<br>
<br>
Please can someone point me to a sample functions covering these
requirements, or just fill in the gaps below.<br>
No, I'm not asking for someone to just write it for me.<br>
<br>
Thanks in advance,<br>
Zoltan<br>
[Having a brain-dead day :-( ]<br>
<blockquote><br>
from qgis.core import *<br>
from qgis.gui import *<br>
<br>
@qgsfunction(args='auto', group='Custom', referenced_columns=[])<br>
def zCutBox(feature, parent):<br>
vertices = <br>
<br>
blah blah<br>
return vertices[0][0]<br>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
=============================================
Zoltan Szecsei GPrGISc 0031
Geograph (Pty) Ltd.
GIS and Photogrammetric Services
Cape Town, South Africa.
Mobile: +27-83-6004028 (Signal, not WhatsApp)
<a class="moz-txt-link-abbreviated" href="http://www.geograph.co.za">www.geograph.co.za</a>
=============================================
</pre>
</body>
</html>