Salesforce - Reverse lookup geo into an address - type-conversion

I am struggling with this, at the moment we have an application that sends the Lat and Long to Salesforce which we store in two seperate geo code fields.
For example
Subscriber_lat = latitude
Subscriber_long = longitude
We need this converted to
Address = 14 Street Name Street, Suburb, State, Country, Postcode
The problem we have is we want to convert this to an address so we can report on it (e.g. Suburbs, States etc)
Does anyone know of a solution here?
Michael

A service such as Google Map's API can do this.
Reverse Geocoding (Address Lookup) The term geocoding generally refers
to translating a human-readable address into a location on a map. The
process of doing the opposite, translating a location on the map into
a human-readable address, is known as reverse geocoding.
Required parameters in a reverse Geocoding request:
latlng — The latitude and longitude values specifying the location for
which you wish to obtain the closest, human-readable address.
key — Your application's API key. This key identifies your application
for purposes of quota management.

Related

Bing maps Rest API objects not the same

I need to create an API services that calls Bing maps Rest API gets Address, Elevation and latitude and longitude values.
I see that there a Autosuggest that returns an Address object, I also see you have Find location by address api that also returns an Address object. My question is why both address object are not the same? and can it be the address adding the missing fields ?
As I need all the values from the address object from Autosuggest .I would like to call the Find location by address api and get a list of address with the latitude and longitude values as well. Currently I making 3 api calls
The autosuggest and Location APIs, do use the same Address class/object, however this is a lower-level property of the main response from each API.
The autosuggest API returns an autosuggest response that can contain a LocalBusiness, Place, or Address object. All of these have an address property that is an Address object. The __type property in these responses provide an additional insight on the type of result.
The location APIs, return a Location object that has an address property that is the same Address object used in the autosuggest API.
There are some differences in the response objects, but they all include the same Address object.
The autotsuggest responses do not include location details such as latitude/longitude as this information has a higher cost and including this information would mean this service would have to have the same cost per request as the Location API. By separating out this information, the Autosugget API only generates a 1/10th of a transaction per request (10 times cheaper than the Location API). Since in a normal autosuggest experience, a user will likely generate 5 to 10 requests to this service, when typing a single input, this makes the overall cost of this experience significantly cheaper. If each request was charged a full transaction, most companies would quickly find the cost of this experience to be extreme.
For your scenario, the expectation would be atleast 3 requests as defined below.
One or more to the autosuggest API with the users input.
One taking the formattedAddress value from the Address object in the autosuggest response and passing it into the location query API to get the latitude/longitude details.
One taking the latitude/longitude information into the elevation API. Note you can pass in multiple points into this API, and thus get the elevations for an array of address coordinates.

Bing Geocode api not working with Singapore addresses

I tried several valid address but bing map api is not returning a result:
http://dev.virtualearth.net/REST/v1/Locations?adminDistrict=Singapore&CountryRegion=SGP&postalCode=449269&addressLine=80%20Marine%20Parade%20Rd&key=mykey
any ideas?
There are three ways to resolve your issue;
Instead of passing in Singapore as an adminDistrict (i.e. state/province), pass it in using the locality property (city). Alternatively pass it in to both of those properties.
Remove the postal code from the query.
Instead of using a structured address, pass in your address as a query. This is recommended in the best practices and greatly increases the odds of a correct result being found: https://msdn.microsoft.com/en-us/library/dn894107.aspx

How to do Geo IP or postcode lookup against Geonames data

I am using the freely available geonames data locally to do autocomplete searches during the sign up stage on one of my websites.
I am having trouble working out the best way to make the form more user friendly by auto selecting a geoname based on their IP address and also be able to lookup a geoname based on the postcode data.
The problem is that I can't see a way to easily link an IP range or a postal code to a geoname. So what is the best practice here? Do I just run a separate query to lookup the nearest geoname by long/lat against the postcode or IP address?
You don't mention how you are geolocating the IP address, but the MaxMind GeoIP2 and GeoLite2 databases provide the geoname_id of the location. See, e.g., the CSV docs. The binary databases provide this same information.

Canadian Postal Codes via Bing Maps API

A bit of a newb here, although I have some experience with Bing Maps.
Im trying to use the Locations API to search for locations (primarily) in Canada. My data request is successful and I get back expected data...except for one thing. Canadian Postal codes are traditionally six characters long. However, the API only responds with the first three characters. I realize that only the first 3 characters are needed for geolocation but was wondering if it is possible for Bing to return the whole 6 character value.
My data request looks like this:
http://dev.virtualearth.net/REST/v1/Locations?key=[MYKEY]&q=1440+Law&ul=43.45297157764435%2C-79.70163702964783
I've trimmed some fields for relevancy.
Can Bing's Locations API return a full Canadian Postal code?
The Bing Maps Locations API is designed for geocoding and reverse-geocoding, not for address validation.
As you point out, it's generally unnecessary to consider the full postcode for geocoding - the results can be unambiguously identified using a street address and only the first 3 characters of the postcode. So, although I can't say for certain, I'd say the answer is "no".

How to get location name by using latitude and longitude values

In my application i have to get the location name using latitude and longitude values, I think we can get them through reverse geocoding is there any method that we can use and get the location value
Thank You
You may also want to take a look at Geonames.org for placenames lookup. It provides acess to a database with more than 8 million geolocations through a JSON or XML api.
An objective-c wrapper of the web services can be found at ILGeoNames3.
MKReverseGeocoder.