Hi
You have to loop over the nodes in the polygon, for each line/side (2 nodes) you have to calculate the angle/direction of this line/side.
You could use the MATHGetDirection from the MATHLib module to calculate the direction.
For each two lines/sides, you have to calculate the interior angle, and then add this to the total angle sum.
At the end you need to divide the total angle sum with the number of sides/lines to get the average.
HTH
Peter
From: mapi...@googlegroups.com <mapi...@googlegroups.com>
On Behalf Of Ikranur Altuntas
Sent: Monday, 16 January 2023 20.22
To: MapInfo-L <mapi...@googlegroups.com>
Subject: [MI-L] Map Basic -Map Info code
This message originated Externally. Use proper judgement and caution with attachments, links, or responses. |
Hello, I'm ikranur altuntaş. I am a graduate student of surveying engineer. I want to get information about an assignment. I need to write a code that calculates interior angles of irregular polygons and averages these angles in Map Basic and I need to run it in Map Info.
I need to add a code that finds the interior angle of the polygons and calculates the average into the code on the note page I have specified below.
How can I do it? can you help me? Thank you from now.
--
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en
---
You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
mapinfo-l+...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mapinfo-l/feec1a5b-3862-4ed3-826c-26d75828bb00n%40googlegroups.com.