+ Reply to Thread
Results 1 to 7 of 7

Determine if a geo location is within geographic area

  1. #1
    Registered User
    Join Date
    04-27-2020
    Location
    USA
    MS-Off Ver
    2003 Professional/Excel 2016
    Posts
    10

    Determine if a geo location is within geographic area

    1st post! I use Excel 2003. I have a rather large spreadsheet (25k rows) that includes the latitude and longitude of locations. I'm trying to determine which geographic area, outlined by several lat/long data sets, each location (as delineated by its lat/long) resides.

    I appreciate any help. Yes, I've search the intertubes. Thanks!

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Determine if a geo location is within geographic area

    welcome to the forum.

    HOW TO ATTACH YOUR SAMPLE WORKBOOK:
    Fast answers need clear examples. Post a small Excel sheet (not a picture) showing realistic & representative sample data WITHOUT confidential information (10-20 rows, not thousands...) and some manually calculated results. Just before posting, scroll down to GO ADVANCED, click, and then scroll down to MANAGE ATTACHMENTS and click again. Now follow the instructions at the top of that screen.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    04-27-2020
    Location
    USA
    MS-Off Ver
    2003 Professional/Excel 2016
    Posts
    10

    Re: Determine if a geo location is within geographic area

    I've attached a sample. The "Locales" sheet has locations as expressed as Lat/Long. The Areas sheet contains the 4 corners of a geographic area as expressed as a set of Lat and Long data.

    None of the locations are within the area in the second sheet but these locations will be within 1 of 50 or so areas.

    Thanks.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Determine if a geo location is within geographic area

    still using 2003 Professional ?

    Can you post an XLSX file, since I was not able to open it.

  5. #5
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,939

    Re: Determine if a geo location is within geographic area

    This isn't the kind of thing I do, but I think the heart of the algorithm is the "point in polygon" problem: https://en.wikipedia.org/wiki/Point_in_polygon In this case, you solve the "point in polygon" problem for each point and each polygon area.

    One "brute force" approach would be to test each point against each polygon and compile the results.

    I expect there could be ways to reduce the number of polygons to test for a given point.

    I found this UDF that may be useful if you decide to do this in Excel: http://www.excelfox.com/forum/showth...Polygon-Or-Not

    Also in my internet searchings, I found this tutorial for a program (claims to be free and open source) called QGIS: https://www.qgistutorials.com/en/doc...n_polygon.html If you are not required to use Excel for this analysis, it might be easiest to use QGIS (or similar) for this analysis.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  6. #6
    Registered User
    Join Date
    04-27-2020
    Location
    USA
    MS-Off Ver
    2003 Professional/Excel 2016
    Posts
    10

    Re: Determine if a geo location is within geographic area

    I knew that this wouldn't be easy. I appreciate the help. I appreciate the links. I think the last link will be a lot of help!

    Thanks!!!

  7. #7
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: Determine if a geo location is within geographic area

    UDF

    Please Login or Register  to view this content.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Determine with VBA which Area has been selected
    By jeffreybrown in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 01-21-2018, 06:29 PM
  2. Determine List of People at Each Location on Each Day
    By bwalshnl in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-14-2013, 01:36 PM
  3. [SOLVED] Formula for Replacing Codes Indicating Geographic Area with Actual Name of Area
    By andywozhere in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-10-2012, 08:53 AM
  4. Determine print area for all sheets
    By pvp in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-31-2012, 10:41 AM
  5. Function to determine cell location
    By jcg61 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 08-15-2010, 03:31 AM
  6. Determine a techs general area.
    By oneyejack in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-24-2007, 09:20 PM
  7. [SOLVED] Determine area under a curve in Excel
    By Ken in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 01-22-2005, 12:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1