Finding if a set of coordinates is in a particular area

rico355

New Member
Joined
May 20, 2018
Messages
1
Is it possible to use excel to find if a particular set of coordinates falls within an area (composed of coordinates, like a fence)?

In the example below, I have coordinates for all four corners of a made-up home, gym, and work site. I am trying to see if Excel is capable of recognizing what site the Sample Points are located in.
Note: Sample Point 1 = Home, Sample Point 2 = Gym, Sample Point 3 = Work.


Corner 1Corner 2Corner 3Corner 4
XyXyXyXy
Home29.929715-95.25067129.92932-95.25075829.929679-95.25042829.92933-95.250389
Gym29.937167-95.24819329.937171-95.24748229.936654-95.24817329.936656-95.247466
Work29.935902-95.24861829.935912-95.24794729.935369-95.24862529.935379-95.247929
xy
Sample Point 129.929436-95.250624
Sample Point 229.936901-95.247904
Sample Point 329.935536-95.248331

<tbody>
</tbody>
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Is it possible to use excel to find if a particular set of coordinates falls within an area (composed of coordinates, like a fence)?

In the example below, I have coordinates for all four corners of a made-up home, gym, and work site. I am trying to see if Excel is capable of recognizing what site the Sample Points are located in.
Note: Sample Point 1 = Home, Sample Point 2 = Gym, Sample Point 3 = Work.


ABCD
XyXyXyXy
Home29.929715-95.25067129.92932-95.25075829.929679-95.25042829.92933-95.250389
Gym29.937167-95.24819329.937171-95.24748229.936654-95.24817329.936656-95.247466
Work29.935902-95.24861829.935912-95.24794729.935369-95.24862529.935379-95.247929
xy
Sample Point 129.929436-95.250624
Sample Point 229.936901-95.247904
Sample Point 329.935536-95.248331

<tbody>
</tbody>
OK.. You have to follow me very carefully.
Order of the corners has a great importance.
Corners B and D should not be neighbors. They should be opposing corners. Since A, B, C, D is a 4-corner polygon:

1. Draw a line from corner B to D. Now you have a ABD triangle and DBC triangle. Calculate each triangle's area by coordinates theorem. Can I find the total area of the polygon if I merge these triangles base-to-base? Yess..
2. You can merge two triangles and find the total area of polygon.
3. Then think the point hits in a polygon range. Then you may think it as a cake. You can make 4 slices in the shape of a triangle.
4. If sum of all slices equals to total area of polygon, then yes the point is inside the rectangle.

Ok.. Things are getting complicated. Please follow the sample workbook below:
https://drive.google.com/file/d/1TLIq3RUM602qC9iGvtLnOFlAl-IB56VT/view?usp=sharing

Useful resources:
https://math.stackexchange.com/questions/190111/how-to-check-if-a-point-is-inside-a-rectangle
https://www.mathopenref.com/coordtrianglearea.html
 
Upvote 0

Forum statistics

Threads
1,214,957
Messages
6,122,466
Members
449,086
Latest member
kwindels

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top