[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

06/13/2009 at 12:54PM PDT, ID: 24489407 | Points: 500
[x]
Attachment Details

How do I tell if a given latitude and longitude fall within a specific state or province?

Asked by glassgiant in PHP Scripting Language, GIS & GPS Programming

Tags: geography, latitude, longitude, map, php

I want to tell if a point specified by a user (in latitude and longitude, from Google maps) falls within British Columbia, Canada (but will need to add other provinces or states in the future).  If it was nicely "square" (when projected on a 2D surface), like many provinces, this would be easy, but it's not.  So I guess I'm asking 2 questions:
1) where would I find a "connect-the-dots" description of British Columbia's borders, where each point is a latitude and longitude?  I realize there may be several descriptions to account for islands.
2) given a list (or lists) of latitudes and longitudes, how do I tell if a point is within the polygon defined by the points in the list?

I'm using PHP, if that matters.

Thanks!
[+][-]06/13/09 01:26 PM, ID: 24620631

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/02/09 07:15 PM, ID: 24769362

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/07/09 09:04 AM, ID: 24795461

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/08/09 03:49 PM, ID: 24809236

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/08/09 03:50 PM, ID: 24809247

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/08/09 03:54 PM, ID: 24809260

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/08/09 03:55 PM, ID: 24809273

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-91 - Hierarchy / EE_QW_4_20070622