Page 1 of 2 12 LastLast
Results 1 to 15 of 17

Math Help - Working out whether a specific point is in a specified area - please help!

  1. #1
    Newbie
    Joined
    May 2008
    Posts
    9

    Working out whether a specific point is in a specified area - please help!

    Hi everyone

    First post. I apologise in advance if this question is a little elementary, but I hope you are able to help.

    I am working on some travel sites and would like to try to work out whether a given point is in a given area.

    Let's suppose I had longitude/latitude information for Manhattan's boundary. I have a series of co-ordinates which I join together by a straight line in order to define the area.

    Now... let's suppose I am given co-ordinates for, let's say, the Empire State Building and Bronx Zoo. I want to be able to mathematically deduce whether these two points fall inside or outside the boundary. Obviously, in this case, the ESB does, and the BZ doesn't. But is that easy to work out automatically?

    Please note, I am not a mathematician so really need an explanation of how to work this out that a non-mathematician would understand!

    Thanks a lot,

    Aaron
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Bar0n janvdl's Avatar
    Joined
    Apr 2007
    From
    Meh
    Posts
    1,630
    Thanks
    6
    Quote Originally Posted by altyfc View Post
    Hi everyone

    First post. I apologise in advance if this question is a little elementary, but I hope you are able to help.

    I am working on some travel sites and would like to try to work out whether a given point is in a given area.

    Let's suppose I had longitude/latitude information for Manhattan's boundary. I have a series of co-ordinates which I join together by a straight line in order to define the area.

    Now... let's suppose I am given co-ordinates for, let's say, the Empire State Building and Bronx Zoo. I want to be able to mathematically deduce whether these two points fall inside or outside the boundary. Obviously, in this case, the ESB does, and the BZ doesn't. But is that easy to work out automatically?

    Please note, I am not a mathematician so really need an explanation of how to work this out that a non-mathematician would understand!

    Thanks a lot,

    Aaron
    If I understand you correctly...

    If you have the boundaries' coordinates, then the latitiude of the point must be a value between the latitudes if the boundaries AND its longitude must be a value between the longitude of that of the boundaries.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    May 2008
    Posts
    9
    Thank you for the reply but - alas - I don't think it's as simple as that.

    Take this map for example:




    If you take the "L" of Lugano... this point is within the lat/long extremes but, because of the irregular shape, it doesn't fall within the boundaries of the specific region.

    Or have I not understood your reply correctly?
    Last edited by altyfc; May 22nd 2008 at 12:22 PM.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Bar0n janvdl's Avatar
    Joined
    Apr 2007
    From
    Meh
    Posts
    1,630
    Thanks
    6
    Quote Originally Posted by altyfc View Post
    Thank you for the reply but - alas - I don't think it's as simple as that.

    Take this map for example:




    If you take the "L" of Lugano... this point is with the lat/long extremes but, because of the irregular shape, it doesn't fall within the boundaries of the specific region.

    Or have I not understood your reply correctly?
    Excuse me for not understanding, but why would you want to check if the text is in the area? Are you not concerned about the point only?

    EDIT: Oh maybe you only used the "L" as an example. I can honestly not think of a way to check if it would be in the area if the area has such an irregular shape.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    May 2008
    Posts
    9
    Yes, the L was just an example... I was simply illustrating that it didn't 'work' for the method I think you were suggesting.

    I just want to find whether point x (for which I would have lat/long co-ordinates) fits in area y (for which I would have a series of co-ordinates which, when connected together, would mark the boundary).

    I'm sure there must be a way...

    Aaron
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Forum Admin topsquark's Avatar
    Joined
    Jan 2006
    From
    Wellsville, NY
    Posts
    10,211
    Thanks
    419
    Awards
    1
    Quote Originally Posted by janvdl View Post
    If I understand you correctly...

    If you have the boundaries' coordinates, then the latitiude of the point must be a value between the latitudes if the boundaries AND its longitude must be a value between the longitude of that of the boundaries.
    What about the red dot? It's outside the figure but inside the longitude and latitude boundaries that you specified.

    -Dan
    Attached Thumbnails Attached Thumbnails Working out whether a specific point is in a specified area - please help!-area.jpg  
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Newbie
    Joined
    May 2008
    Posts
    9
    Yes, that's right.

    This is the same point as I was trying to make. But your diagram illustrates it much more clearly, thank you.
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Bar0n janvdl's Avatar
    Joined
    Apr 2007
    From
    Meh
    Posts
    1,630
    Thanks
    6
    Quote Originally Posted by topsquark View Post
    What about the red dot? It's outside the figure but inside the longitude and latitude boundaries that you specified.

    -Dan

    I didn't consider abnormal shapes...

    How exactly will it be determined? By computer?
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Newbie
    Joined
    May 2008
    Posts
    9
    Yes, we would be looking to decipher this by computer, as we'd be wanting to do this for multiple points (thousands, in fact!).

    We just need to somehow grasp an understanding of the maths that any scripting would need to be based on.
    Follow Math Help Forum on Facebook and Google+

  10. #10
    Bar0n janvdl's Avatar
    Joined
    Apr 2007
    From
    Meh
    Posts
    1,630
    Thanks
    6
    Quote Originally Posted by altyfc View Post
    Yes, we would be looking to decipher this by computer, as we'd be wanting to do this for multiple points (thousands, in fact!).

    We just need to somehow grasp an understanding of the maths that any scripting would need to be based on.
    Why not divide the map into small squares?
    Follow Math Help Forum on Facebook and Google+

  11. #11
    Newbie
    Joined
    May 2008
    Posts
    9
    I imagine that might be a possibility but I just assumed there must be a way of calculating this more immediately... ??
    Follow Math Help Forum on Facebook and Google+

  12. #12
    Bar0n janvdl's Avatar
    Joined
    Apr 2007
    From
    Meh
    Posts
    1,630
    Thanks
    6
    Quote Originally Posted by altyfc View Post
    I imagine that might be a possibility but I just assumed there must be a way of calculating this more immediately... ??
    My knowledge is too limited for this, I'm sorry. Maybe one of our senior mathematicians will take a look at this and let you know if it's possible.

    EDIT: Since it's going to be on a computer, why not define the positions of the pixels as boundaries, and check if a point is between the specific row of pixels?
    Follow Math Help Forum on Facebook and Google+

  13. #13
    Newbie
    Joined
    May 2008
    Posts
    9
    Quote Originally Posted by janvdl View Post
    EDIT: Since it's going to be on a computer, why not define the positions of the pixels as boundaries, and check if a point is between the specific row of pixels?
    Unless I'm misunderstanding you, I think that's the same as your original suggestion, and won't allow for irregular shapes.

    Should I be posting this in the advanced geometry forum? It's too advanced for me, but I was hesitant about posting it there straight off, as I wasn't sure if it would be considered 'advanced' here...
    Follow Math Help Forum on Facebook and Google+

  14. #14
    Bar0n janvdl's Avatar
    Joined
    Apr 2007
    From
    Meh
    Posts
    1,630
    Thanks
    6
    Quote Originally Posted by altyfc View Post
    Unless I'm misunderstanding you, I think that's the same as your original suggestion, and won't allow for irregular shapes.
    No let's say on a specific line, we have a part of the boundary. Or a few pixels, as the left boundary. And on the same horisontal line, we have the right boundary of a few pixels. Now we check that the point itself, is between the pixels.

    So we are dividing the whole map into pixels. And then we check for all the black pixels which we say makes up the outer border of a country, for example.

    Quote Originally Posted by altyfc View Post
    Should I be posting this in the advanced geometry forum? It's too advanced for me, but I was hesitant about posting it there straight off, as I wasn't sure if it would be considered 'advanced' here...
    No keep it in this forum. You will get in trouble for "double posting".
    Follow Math Help Forum on Facebook and Google+

  15. #15
    Newbie
    Joined
    May 2008
    Posts
    9
    But, even if your point falls between the left-hand-most boundary and the right-hand-most, you will can't necessarily make the assumption that a point between those two points is within your area.... I don't think, at least.
    Follow Math Help Forum on Facebook and Google+

Page 1 of 2 12 LastLast

Similar Math Help Forum Discussions

  1. Derivative of specific point
    Posted in the Calculus Forum
    Replies: 4
    Last Post: September 13th 2011, 07:30 PM
  2. Replies: 2
    Last Post: March 28th 2011, 05:49 AM
  3. Which point is closest to a specific line?
    Posted in the Calculus Forum
    Replies: 2
    Last Post: December 3rd 2009, 12:49 PM
  4. Derivative of a Function at a specific point
    Posted in the Calculus Forum
    Replies: 4
    Last Post: November 8th 2009, 01:30 PM
  5. Specific Point of Limit on graph
    Posted in the Calculus Forum
    Replies: 3
    Last Post: August 5th 2009, 02:32 PM

Search Tags


/mathhelpforum @mathhelpforum