Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to find address is invalid even if Google returns geocoding?

lxiscasAug 20 2012 — edited Aug 21 2012
Hi, guys:

I am using Oracle APEX to get geocoding from Google, but some of addresses are actually invalid, Google still returns an alternative geocoding, most likely the center of the city. Is there any way that I could know it is actually an invalid address so I can avoid use these inaccurate geocoding? For example, the following address is inaccurate, so how can I find it is n invalid address even Google map service returns a geocoding?
			declare
		  
			  l_address varchar2(4000);
			  l_url varchar2(32000);
			  l_response varchar2(3200);
		  
			  BEGIN
				/* TODO implementation required */
			
				l_address:=APEX_UTIL.URL_ENCODE('Rt. 1 Box 97-5 Braggs Muskogee Oklahoma 74423');
				dbms_output.put_line(l_address);
				l_address := replace(l_address,' ','+');
			
				l_url := 'http://maps.google.com/maps/geo?q='||l_address||'&'||'output=csv';
				l_response := utl_http.request(l_url, APEX_APPLICATION.G_PROXY_SERVER);
				dbms_output.put_line(l_response);
				l_response:=substr(l_response,instr(l_response,',',1,2)+1);
			
				dbms_output.put_line('In function: l_response ='||l_response);
    
  
  
            END;
    
Edited by: lxiscas on Aug 20, 2012 1:23 PM

Edited by: lxiscas on Aug 20, 2012 1:23 PM

Edited by: lxiscas on Aug 20, 2012 1:26 PM
This post has been answered by RobbieNerve on Aug 21 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 18 2012
Added on Aug 20 2012
3 comments
875 views