Focal Point
Geocoding Data

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/1381057331/m/101108952

October 06, 2009, 05:52 PM
gweller
Geocoding Data
I am wondering if anyone has had success geocoding your data using a freely available source via DataMigrator. I am interested in the approach you took and the provider you may have used.

To throw a monkey wrench into it I am looking for Canadian based addresses as I work for a provincial ministry (US addresses have no relevence, outside of perhaps being a good example)

Thanks in advance


WebFOCUS 8201M/Windows Platform
October 07, 2009, 07:45 AM
Tobar
quote:
To throw a monkey wrench into it I am looking for Canadian based addresses as I work for a provincial ministry (US addresses have no relevence ...)

My! How "provincial" of you. Smiler My address has a lot of relevence to me! I always thought it was just the US citizens who were ego-centric. Wink

I am sorry to say other than being a smart-aleck I can offer no helpful input.


------
Livin' down on the cube farm. Left, right, right.

iWay 5.6
Windows
Excel, Tab-delimited, XML
April 05, 2010, 05:59 AM
Frans
You could use google maps geocode api:

First make a masterfile (GEO in this case) of the xml google uses. To make the masterfile just save this output

http://maps.google.com/maps/ge...+View,+CA&output=kml and create a masterfile with dmc or the webconsole.

Now you need to make a procedure which gets the data from the Google geocode api, in this case we feed country, city and address to Google:

-SET &GMREQUEST = 'http://maps.google.com/maps/geo?q='||&COUNTRY.EVAL ||'+'||&CITY.EVAL||'+'||&ADDRESS.EVAL'&'||'output=kml'||'&'||'key=<you google key here>';
 
FILEDEF GEO HTTP &GMREQUEST
-RUN
TABLE FILE GEO
PRINT COORDINATES
ON TABLE HOLD AS GEOCODE FORMAT ALPHA
END   


This will retrieve 1 set of coordinates, you'll have to create a loop to get coordinates for multiple addresses. I believe there is a limit of 5000 records a day for this free service.


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
April 08, 2010, 06:44 PM
cokeyng
Hi,

We implemented the solution as suggested. But got the following error when it executing it.

(FOC358) ERROR ISSUING FILEDEF COMMAND FOR: filedef uat_test/geo HTTP http://maps.google.com/maps/geo?q=.....

0 NUMBER OF RECORDS IN TABLE= 1 LINES= 1
No data was returned by the server

Any idea what may go wrong? Also, when we create the geo synonym, are we supposed to create a XML SYNONYM with File system first?

Thanks

Cokey


iWay 5.5, 6.01
Windows
all output (Excel, HTML, PDF)
April 13, 2010, 05:19 AM
Frans
Hi Cokey,

You could try this to check if it's working:

-SET &GMREQUEST = 'http://maps.google.com/maps/geo?q=1600+Amphitheatre+Parkway,+Mountain+View,+CA&ouput=kml';
 
FILEDEF GEO HTTP &GMREQUEST
-RUN
TABLE FILE GEO
PRINT COORDINATES
ON TABLE HOLD AS GEOCODE FORMAT ALPHA
END   


Check the syntax Google needs to provide you coordinates.


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.