Skip to content

About Geocoding Api Briefly

Foreword

When we say regarding user`s requires to the Application Programming Interface Distance Matrix (Api DM) service to obtain route calculations and the time of their passage, it is necessary to pay attention to the superscription`s form in requests. The best option is to itemize the superscription in species of geo-coordinates – width and length.

However, this option is not always possible, and often users define start and end locations in the form of postal addresses – countries, cities, streets, house numbers, etc. For the service to work properly, all arbitrary data specified by users must be converted into geo-coordinates. This task is successfully solved by the geocoding process – geocoding apis.

The essence of geocoding api

Based on the foregoing, the essence of the geocoding process becomes clear. This is nothing more than the transformation of a postal address into geo-coordinates of any object in order to reckon routes at the user’s requires. Accordingly, inverse geocoding is the process of determining the address of an object from its geo-coordinates in order to facilitate the reading of this information by the user.

Returning to the api distance matrix, and knowing what tasks this service executes, the reason for the demand of the outright and reverse geocoding processes becomes obvious. At the same time, we must consider one very important fact. Despite the different size of user’s requires to the geocoding api, the rejoinder of the service will cover almost any location on the world map with high accuracy.

It is well known that almost all the world’s leading IT services cope with the assignment of outright and inverse geocoding. We can proudly state that the api distance matrix also provides the necessary level of this process, which, at the same time, is maximally adapted to world analogues.

From theory to practice

Speaking about the practical side of working with geocoding api, we need to initiate with circumstance that the request is formed in the form of http protocol. In this case, the user can include in the request the designation of the initial and final locations, both in the size of geographical position and in the size of a mail address. If the utilizer inputs an actual address, they need to know the postal format that is applicable in the country in which the route has to be calculated. Therefore, specifying the address in any of its formats is a mandatory constituent element of each require tied to geocoding api.

The second mandatory argument of any request is a personal user identifier or api key. For a deeper understanding of the procedure for applying the api key, you should read the corresponding section of the api distance matrix documentation. The utilizer which makes a require for the geocoding api just needs to specify two required parameters and the service will generate a rebound to his request.

However, in addendum to the essential characteristics, the request can include optional information, which is described in detail in the corresponding section of the api distance matrix documentation.

If the user specified locations in the form of postal addresses in the request, geocoding api transforms them into the system of coordinates including latitude and longitude. Beyond maintenance user request geocoding api generates a response using the IT accent – Jason. It is important to note that during response generation, the processes of direct or reverse geocoding can originate. It denotes that the geocoding api response specifies locations in the size of addresses that are easy for the user to read.

Similar to the request, the indication of postal addresses of locations in the response of the geocoding api must comply with the rules and requirements of the country in which the routes are rated.

It is important to note that geocoding api response contains separate fields, both with total location address and with separate components that related to this address. At the same time, it is acceptable that the size of information in the field with the address`s components can significantly exceed the size of information in the field with total location address.

In cases when the utilizer`s require comprises the frame of whereabouts position (width and length) in lieu of the actual address, then geocoding api performs the operation of inverse geographical coding to an address convenient for the user to read. From this we can make a conclusion that specifying the system of axes in the size of latitude and longitude in the request is a mandatory component of such requests. And of course, without the presence of a user`s identifier – the api identifier (key) in the require, the response of geocoding api will report that it is impossible to process the request.