GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
How to get Lat/Lon from Postal Code?  XML
Forum Index -> Postal Codes
Author Message
tzippy



Joined: 31/05/2010 18:03:45
Messages: 1
Offline

I need to get the lat lon for a specific postal code.
What I do now is get the nearby postalcode for the specific postal code and get then get their lat/lon values.
In Java:

Code:
 PostalCodeSearchCriteria postalCodeSearchCriteria = new PostalCodeSearchCriteria();
 	postalCodeSearchCriteria.setPostalCode(postcode);
 	java.util.List<PostalCode> postalCodes =  WebService.findNearbyPostalCodes(postalCodeSearchCriteria);
 for(PostalCode p : postalCodes){
 if(p.getPostalCode().equals(postcode)){
 	system.out.println("Match!:" + p.getLatitude() + " " + p.getLongitude());
 	}
 }
 



There has to be a way to get Lat Lon directly from one specific postalcode!

Thanks in advance!
geotree


[Avatar]
Joined: 23/07/2007 18:28:40
Messages: 138
Location: France
Offline

Did you look at postalCodeLookup and postalCodeSearch webservices ?
http://www.geonames.org/export/ws-overview.html

Christophe
geotree.geonames.org
geotree.geonames.org/geotree.html
[WWW]
 
Forum Index -> Postal Codes
Go to:   
Powered by JForum 2.1.5 © JForum Team