Google Maps CoOrdinates

Reply
New Contributor
Posts: 3

Google Maps CoOrdinates

I'm using SAS Enterprise Guide v5.1 and currently have a table that looks like the following

 

Address

123 Street Name, Town, Ireland

456 Big Road, Other Town, Ireland

etc.

 

Can anyone please tell me how to connect to Google Maps API (preferably the free version that allows up to 2000 searches) and determine the geographical co-ordinates of the addresses in the table? I wish then to create a new table that looks like:

 

Address                                                       Latitude                  Longitude

123 Street Name, Town, Ireland                  1.23456                    6.54321

456 Big Road, Other Town, Ireland              5.67890                   0.98765

etc.

Grand Advisor
Posts: 17,396

Re: Google Maps CoOrdinates

Have you considered PROC GEOCODE, especially if you have SAS 9.4

 

http://support.sas.com/documentation/cdl/en/graphref/67881/HTML/default/viewer.htm#p087i29802bnfgn1q...

 

You may need to download a dataset for it to work for Ireland.

New Contributor
Posts: 3

Re: Google Maps CoOrdinates

Hi Reeza,

 

Yes, I considered using PROC GEOCODE but it seems to be catered specifically for USA/Canada/UK (anywhere with a definied postal code system such as zip codes) and not for Ireland

 

That's why I'm wondering specifically about the Google Maps API

 

Also, I have SAS 9.3

Grand Advisor
Posts: 17,396

Re: Google Maps CoOrdinates

Here are two examples. One issue is that they wrote them a while back and the API changes over time.

 

I think the second one has been maintained over time. I do know that it's still possible Smiley Happy

 

http://www.sascommunity.org/wiki/Geocoding_using_SAS_and_Google_Maps

 

http://www.sascommunity.org/wiki/Driving_Distances_and_Drive_Times_using_SAS_and_Google_Maps

 

 

New Contributor
Posts: 3

Re: Google Maps CoOrdinates

Reeza,

 

Thanks for digging these out for me. Unfortunately I have not been able to adapt these to work for me

 

From the first source, http://www.sascommunity.org/wiki/Geocoding_using_S​AS_and_Google_Maps, I get the following errors

 

ERROR: Host name maps.google.com not found.

ERROR: Physical file does not exist, C:\GoogleGeocode\Googlexml2.xml.

 

  • There doesn't appear to be any reference to what this XML file contains

 

ERROR: Physical file does not exist, C:\GoogleGeocode\Googlexmlmap.map.

ERROR: Encountered during XMLMap parsing at or near line 1, column 1.

ERROR: XML describe error: Internal processing error.

 

  • I have created the .map file exactly as specified but it seems to be causing errors. I have no experience with XML at all so I'm wondering if you have been able to get it to work?

 

 

 

Grand Advisor
Posts: 17,396

Re: Google Maps CoOrdinates

I know the second one works...

New Contributor
Posts: 3

Re: Google Maps CoOrdinates

What is the minimum version number of Enterprise Guide this will work with please?

 

I'm using EG 6.1 and I'm being told by our IT support team that the reason I'm getting a "Host not Found" error is because this isn't supported in the version we run, and nothing to do with the setup or my access priviledges.

 

Thanks,

 

Jamie

Ask a Question
Discussion stats
  • 6 replies
  • 404 views
  • 0 likes
  • 3 in conversation