ICGC Geocoder | icgc

ICGC Geocoder

Geocoding is the process of turning addresses and place names into geographic coordinates

The ICGC Geocoder allows you to obtain the coordinates of a place located in Catalonia from its postal address,its name (toponym) or the kilometric point. It also allows the opposite operation, reverse geocoding, which consists of obtaining the postal address, the name of the place name or the nearest kilometer point to a position expressed in coordinates.

 

Connection URL 

https://eines.icgc.cat/geocodificador

Viewer (search, autocomplete and reverse)

The ICGC Geocoder is a Web Application Programming Interface API REST, embeddable into other applications, making it simple to add an address finder to a map viewer.

It offers the following functionalities:

  • Search for postal addresses of the following types:
    • House number (street name + house number + municipality or llogaret).
    • Isolated building (name of the isolated building + municipality or llogaret).
  • Search for streets (street name + municipality or llogaret.
  • Get the bounding box of a street.
  • Search for toponyms (name + municipality).
  • Search for kilometric points (road number + km).
  • Reverse geocoding: to get the list of places near a given latitude/longitude point.
  • Search within a circular or rectangular geographic area.
  • Search within a 'comarca' or a municipality.
  • Narrow the search to certain types of toponyms.
  • Prioritize results by proximity.
  • Availability of two direct geocoding endpoints, which are advisable to combine:
    • autocomplete: to give real-time result suggestions without having to type the whole location.
    • search (whole search): Once the text has been completed, if the answers provided by autocomplete are not sufficient, a request can be made to the search operation.

It is recommended to use client libraries that incorporate these usage guidelines, such as Leaflet and the Nextzen (formerly Mapzen) plugin, as done in the example Viewer, implemented with Leaflet and explained in the Map Viewer with queries to the ICGC Geocoding service.

 

Operations

It has the following operations:


The input and output parameters can also be consulted in the documentation https://eines.icgc.cat/geocodificador/api-docs/.

  

Examples

Below are some examples of using the ICGC geocoding service:

  • Search for an address:

    For example, by typing "nou 3, Girona" we get the geographical coordinates of the address "Carrer Nou 3, Girona": 2.82253786,41.98266812:

Input
https://eines.icgc.cat/geocodificador/autocompletar?text=nou%203,girona&size=1&layers=address
Output
Imatge
Exemple adreça postal

 

  • Reverse geocoding:

    For example, by specifying the coordinate 2.82253786,41.98266812, we get the postal address "Carrer Nou 3, Girona":

Input
https://eines.icgc.cat/geocodificador/invers?lon=2.82253786,&lat=41.98266812&size=1&layers=address
Output
Imatge
Exemple cerca inversa

 

  • Get the 'llogaret' an address belongs to

    By searching for a postal address, we can obtain the llogaret (village or population center) to which it belongs. This information appears in the llogaret field and at the end of the label field, between parentheses.

    For example, when searching for the address carrer de l'esglesia 1, la vall de boi, we get the 3 portals that are in the towns of Durro, Barruera and Taüll, belonging to the municipality la Vall de Boí.:

    exemple carrer de l'esglesia 1, la vall de boi

 

  • It is also possible to indicate the name of the driver in the request.

    For example, indicate carrer de l'esglesia 1,durro:

    exemple carrer de l'esglesia 1, durro

 

Imatge
Integració en un visor Leaflet

 

Imatge
Prioritzar els resultats més propers a un punt determinat

 

Imatge
Restringir la cerca dins una àrea geogràfica circular o rectangular

 

 

 

  • Search for a kilometric point.

    By indicating C-25 143.0 in the text parameter, we get the geographical coordinates of the kilometric point.

    If the layers parameter is specified, it must contain the value pk.

Input
https://eines.icgc.cat/geocodificador/autocompletar?text=c-25 143&size=1&layers=pk
Output
Imatge
Exemple cerca pk

 

.