# Map Basic -Map Info code

41 views

### İkranur Altuntaş

Jan 16, 2023, 5:09:49 PMJan 16
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.

cbs.txt

### Peter Horsbøll Møller

Jan 17, 2023, 2:58:27 AMJan 17

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

Sent: Monday, 16 January 2023 20.22
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
To unsubscribe from this group, go to:
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at

---
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.