Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Longitude/Latitude question for my MAI siblings 1

Status
Not open for further replies.

SantaMufasa

Technical User
Jul 17, 2003
12,588
US
Ladies and Gents,

I'm posting this question here (and in the "Squaring the Circle" Forum) because of the great depth and breadth of knowledge and wisdom (both technically and otherwise) that our members bring to these fora. I hope that you can advise me according to my need. (Also, I believe that others might benefit from your suggestions and from my results of applying your suggestions.)

Here is my need: I am a membership clerk for an organisation. I have addresses for our members. One of our group leaders has a need for a "proximity listing" (i.e., who are the "n" closest neighbors amongst our membership to another member.)

As we MAI and STC fora members already know, we have nice algorithms posted in the fora that can calculate distances from Longitude/Latitude co-ordinates.

My problem is that I am not interested in re-covering ground that someone else has already covered and I am a very firm believer in the "Write-it-once" principle (and not re-entering data that already exists electronically somewhere.)

Therefore, can someone amongst us offer a suggestion of either a FREE Geographical Information System (GIS) web-site, share-ware, other resource, et cetera into which I can pour my membership-address data and have it spit out the LON/LAT co-ordinates for each address? (The free part is important because leadership has not allocated fundage for this feature.)

I appreciate any guidance you have for me on this topic.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[ Providing low-cost remote Database Admin services]
Click here to join Utah Oracle Users Group on Tek-Tips if you use Oracle in Utah USA.
 
I have the technical expertise to do this for you as long as the addresses are all contained within the same state. I am working on functionality to provide this type of service for the entire U.S., but I'm not quite there yet. If you are interested, you can goole my tek-tips handle and get a phone number and/or email address.

Additionally, I found this website that may also help.


-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
This is even better.

Suppose you want to get the lat/lon for the white house. You know the address is 1600 Pennsylvania Ave NW, Washington DC 20502. (I got the address from the website).

Now, if you copy paste the following in to the address bar of internet explorer, I think you will be pleasantly surprised.

Code:
[URL unfurl="true"]http://rpc.geocoder.us/service/rest?address=1600[/URL] Pennsylvania Avenue NW, Washington, DC

Or, click the following link to see the results.


-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Gmmastros,

Yes, thanks for your suggestion with this link.

First, I must acknowledge that I sincerely subscribe to the principle that "Beggars cannot be Choosers". So, I am very grateful for what is at that link. Having said that, I am wondering:

1) Is there a method (either via this link or some other alternative and given the previous cost constraints) that allows a "batch submission" of addresses and then results in corresponding output?

2) Is there an option that is a bit more accurate from a GIS perspective? When I enter my address into the link, the result (40.569175, -111.802867) is several houses away (according to Google Earth) from my actual Lon/Lat of 40.568823, -111.804100. Under other circumstances, the link results might be accurate enough. But under my circumstances, the memberships of our group are often next-door neighbors, so being 5-6 houses off defeats the purpose of this particular exercise.

Thanks for your response(s).


[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[ Providing low-cost remote Database Admin services]
Click here to join Utah Oracle Users Group on Tek-Tips if you use Oracle in Utah USA.
 
Wow, Santa! I just checked out your house. You have one beautiful view!!

Sorry I can't be of any help in your quest.

[tt]_____
[blue]-John[/blue]
[/tt][red]Quidquid latine dictum sit, altum viditur[/red]

Help us help you. Please read FAQ181-2886 before posting.
 
Perl and LWP would let you batch them, or PHP and Curl, or a simple batch file with wget

HTH
--Paul

Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
Hmmm... That didn't used to be Google Earth...

-------------------------
Just call me Captain Awesome.
 
Thanks SO much for that Google Earth link. I just wasted an hour flying down the Grand Canyon and locating my house and my office.

Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Here is a clarification of my application environment:

Our memberships, by and large, are neighbors. We have about 250 addresses within a 1.5-square-mile area. We are all in the same ZIP code. Google Earth gives my Lon/Lat data down to about 5-ft. granularity, but I just want to avoid "hovering" my mouse over each house, then manually transcribing the two 9-digit Lon/Lat values into my data records for each household.

Sorry that I didn't provide this clarification earlier.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[ Providing low-cost remote Database Admin services]
Click here to join Utah Oracle Users Group on Tek-Tips if you use Oracle in Utah USA.
 
There are, generally, 2 methods for geocoding an address.

1) Using street centerline data.
You can get the street that the address is located on. Streets have attribute data associated with them. Usually, the attribute data doesn't accurately accomodate the real world data. In most urban areas, a street is typically 0.1 miles long (a city block). In the data, the house number ranges typically go from 100 to 199, the next block would be 200 to 299. In reality, there may be 25 houses on each side of the street, so it should really be 100 to 150, 200 to 250. To locate a house, the position is interpolated to provide an actual lat/long. The interpolation process assumes that houses are evenly spaced along the street. So, in the example I gave, 150 would appear 1/2 way down the block, when in reality, it is actually at the end of the block.

2) Parcels
Parcels are polygons (areas of land) representing an address. Ultimately, you want a single lat/long for the address representing where the driveway for the house intersects the road. There is no data, that I am aware of, that includes driveway information. Since the driveway information is not available, you would have to interpolate the position of the driveway along the centerline of the street. Parcels are much better than street centerlines, but represents much more data, so most geocoding engines don't use parcels.

Parcel information is much more difficult to get, because it is constantly changing. As a new housing development is added, a large parcel is broken up in to smaller parcels.

Many counties, in the U.S., maintain a parcel map to accomodate tax collection and emergency services (like police, fire and ambulances). Sometimes, county governments charge for this data (which would fall outside the scope of this project). If you are lucky enough to get a parcel map (digitally) from your county government, there would still be a lot of work to convert addresses to lat/longs. Usually, county governments store their data in a non-WGS84 projection. Typically they use a state plane projection, which you would need to convert to WGS84 first.

Obviously, both methods have their challenges. My recommendation would be to use the web service that I mentioned in a previous post. Geocode your addresses, and then determine if the information is good enough. Unfortunately, since you are constrained by budget, you may have to settle for the data that is available. Since your ultimate goal is to determine the n number of addresses that are closest to another address, the *slightly* inaccurate data may be good enough.

If you can obtain the parcel maps from your local county government, and you convince me that this is for a good cause (like community watch or something similar), then I would be willing to help you out at no cost. This would have to be in my spare time (which is precious these days).

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
There's an API for Google Maps that might be worth looking into. I know it can be used to setup addresses, but they have to be tracking the mouse over the raster image for adding points, when all the points are added


HTH

Might be a bit more effort than originally intended, but could reap rewards in newer projects

Regards
--Paul


Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
George, excellent explanation(s), above.

Given the relative "inaccuracy" of the Lon/Lat free alternatives, I may just elect to stay with what I already have devised, which works rather nicely: Since our addresses are all in Metropolitan Salt Lake City, Utah, we benefit from the brilliance of Brigham Young's original choice to lay out The Valley on a co-ordinate grid system, with the southeast corner of Temple Square being the origin.

For example, my address is 10037 South Majestic Canyon Road, Sandy. Majestic Canyon Road is 3170 East. Since there are 800 "units" per mile in this grid, each unit is 6.6 feet. Having these facts and the numeric location of each street affords me the same distance-calulating capabilities as with Lon/Lat. Therefore, since any of the free Lon/Lat options look fairly labor intensive and the results are not as accurate as we need, perhaps my best bet is to continue to rely on "Brother Brigham's Bright and Brainy Solution".

If anyone uncovers other alternatives, please feel free to post them here. Thanks for all the suggestions so far.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[ Providing low-cost remote Database Admin services]
Click here to join Utah Oracle Users Group on Tek-Tips if you use Oracle in Utah USA.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top