How can I do Geocoding?

1 view
Skip to first unread message

hollowire

unread,
Jun 25, 2007, 7:41:38 AM6/25/07
to WHERE GPS Developers
I want to get an address from the user and then Geocode to get the
Lat / Lng. Would I have to use a third party or is there some
provision within Where to able to do that?

Thanks
Amit

Allen Smith

unread,
Jun 25, 2007, 9:06:06 AM6/25/07
to WHERE GPS Developers
Yes, we have just opened an API allow developers to do geocoding of
addresses and reverse-geocoding of latitude and longitude into an
addresses. To use the service you will need to pass your dev key
which is available at the top of the "settings" page of your WHERE
account.

Here is a sample geocode request:
http://www.where.com/jin/ws/xml/geocode.jin?method=geocode&nr=111&street=Speen%20St&city=Framingham&state=MA&zip=01701&id=12345678&key=<your
key>

method: must be 'geocode'
nr: street number (optional)
street: street name (optional)
city: city name (optional*)
state: state (optional*)
zip: postal code (optional*)
id: unique id of the request (optional; default is 1).
key: developer key
format: 'xml' or 'text' (optional; default is xml). Text returns only
lat/lng ('latitude longitude').

XML response:
<XLS version="1.0.1" xmlns:gml="http://www.opengis.net/gml"
xmlns="http://www.opengis.net/xls">
<ResponseHeader/>
<Response version="1.0" id="12345678">
<GeocodeResponse>
<GeocodedAddress>
<gml:Point>
<gml:pos>42.310919 -71.385746</gml:pos>
</gml:Point>
<Address countryCode="US">
<StreetNr>111</StreetNr>
<Street>Speen St</Street>
<City>Framingham</City>
<State>MA</State>
<Zip>01701</Zip>
<ZipPlus>01701-2000</ZipPlus>
</Address>
</GeocodedAddress>
</GeocodeResponse>
</Response>
</XLS>

Text response
42.310919 -71.385746

Sample Reverse Geocode request:
http://www.where.com/jin/ws/xml/geocode.jin?method=reverse&lat=42.310919&lng=-71.385746&id=12345678&key=<your
key>

method: must be 'reverse'
lat: latitude
lng: longitude
id: unique id of the request (optional; default is 1).
key: developer key


XML Response:
<XLS version="1.0.1" xmlns:gml="http://www.opengis.net/gml"
xmlns="http://www.opengis.net/xls">
<ResponseHeader/>
<Response version="1.0" id="12345678">
<ReverseGeocodeResponse>
<GeocodedAddress>
<gml:Point>
<gml:pos>42.310919 -71.385746</gml:pos>
</gml:Point>
<Address countryCode="US">
<StreetNr>123</StreetNr>
<Street>Speen St</Street>
<City>FRAMINGHAM</City>
<State>MA</State>
<Zip>01701</Zip>
<ZipPlus>01701</ZipPlus>
</Address>
</GeocodedAddress>
</ReverseGeocodeResponse>
</Response>
</XLS>

mate

unread,
Jun 26, 2007, 11:16:30 AM6/26/07
to WHERE GPS Developers
Wondering if geocoding is working for US only or is worldwide?
I've also noticed it does not work well when without zip code.
For the same address (city, street and streetnr) i get two different
lat/lngs depending if I've included zip or not. Is this by design?

On Jun 25, 3:06 pm, Allen Smith <gadget...@gmail.com> wrote:
> Yes, we have just opened an API allow developers to do geocoding of
> addresses and reverse-geocoding of latitude and longitude into an
> addresses. To use the service you will need to pass your dev key
> which is available at the top of the "settings" page of your WHERE
> account.
>

> Here is a sample geocode request:http://www.where.com/jin/ws/xml/geocode.jin?method=geocode&nr=111&str...<your

> Sample Reverse Geocode request:http://www.where.com/jin/ws/xml/geocode.jin?method=reverse&lat=42.310...<your

> > Amit- Hide quoted text -
>
> - Show quoted text -

wue

unread,
Jun 26, 2007, 11:41:40 AM6/26/07
to WHERE GPS Developers
The service is for US and Canada only.
You should get the same result with or without zip code. If you don't
include a zip code, you must have at least city and state.
Not sure why you are getting different results. Can you share the
address you are using?

Markus

Reply all
Reply to author
Forward
0 new messages