Map Basic -Map Info code

53 views
Skip to first unread message

İkranur Altuntaş

unread,
Jan 16, 2023, 5:09:49 PM1/16/23
to MapInfo-L
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.
yeni.png

cbs.txt

Peter Horsbøll Møller

unread,
Jan 17, 2023, 2:58:27 AM1/17/23
to mapi...@googlegroups.com

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

 

Peter Horsbøll Møller
Principal Sales Engineer - Distinguished Engineer

 

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.

İkranur Altuntaş

unread,
Jan 17, 2023, 3:53:26 AM1/17/23
to MapInfo-L
Thanks for the guidance Mr. Peter, I'll try again with this info

17 Ocak 2023 Salı tarihinde saat 10:58:27 UTC+3 itibarıyla Peter Horsbøll Møller şunları yazdı:
Reply all
Reply to author
Forward
0 new messages