>  Docs Center  >  Libraries  >  Mankoff  >  KDM_GEOCODE






  This function geocodes or reverse geocodes using the Google Maps
  API Web Service. Geocode means that the user provides an address
  and this function returns the latitude and longitude. Reverse
  geocode takes a lat,lon pair and returns a human street address.



Calling Sequence

  Result = KDM_GEOCODE( ADDRESS='Somewhere' )
  Result = KDM_GEOCODE( lat=42, lon=24 )

Keyword Parameters

  ADDRESS: A string containing an address
  LATITUDE: A latitude
  LONGITUDE: A longitude
  STATUS: The status message returned by the Google Maps API
  Note that either ADDRESS OR (LATITUDE AND LONGITUDE) should be
  supplied, but not all three.


  A structure containing 3 fields, the address, the latitude, and
  the longitude.


  Needs web access.


    To find out the latitude and longitude of the white house:
    print, kdm_geocode( addr='1600 Pennsylvania Avenue, Washington, DC' )
    Note that the addr field returned is different than the input address.
    You can supply an address with a typo (should be Koshland), no
    city, and no state, and it will still return valid lat/lon coordinates.
    addr = kdm_geocode( addr='225 koshlnd 95064' )
    help, addr.lat, addr.lon, addr.addr
    Reveres geocoding works too, but in this case it provides an
    address range not one specific house number.
    print, kdm_geocode( lat='36.989759', lon='-122.06587' )

Modification History

  Written by: Ken Mankoff, 2010-03-24.

© 2020 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us