In many cases, thinking especially of companies in Belgium with a Belgian customer base, this is not necessary at all. Usually, being able to look up addresses in Belgium is more than enough. To go to a mega GIS provider like Google maps or Openstreetmaps especially for this purpose is usually much too big and the costs are much higher. In order not to have to take this into account, we use the GEOpunt and Address Register API of the Flemish government. These are GIS APIs that provide the government with up-to-date address data for searching and suggesting in Belgium.

To give a practical example, let's mention one of our projects: "Vlaams Steunpunt Vrijwilligerswerk - Vrijwilligersverzekering (VSVW)".

The customer asked for the possibility for volunteers to enter their address with an auto suggestion of only Flemish addresses. Admittedly with a failsafe that the moment the API would not be available they could manually enter their address and it could be checked via the address registry API.

For address suggestion, we used the GEOpunt API. Likewise, this is an API they provide where autosuggestion endpoints are already included. Currently, it is still working with CRAB. Just know, though, that CRAB support will be ended at the end of 2023 (info). Now they have already informed us that they are going to update the API so that it does not lag on old data and it will be linked with the Address Registry in the future.

Geopunt

As mentioned earlier, we used the GEOpunt API for autosuggestion. This API provides a numerous endpoint that allow you to integrate this autosuggestion according to the needs of your application.

https://loc.geopunt.be/swagger/ui/index#/

For us, the best application was to use the V4 Location API since we needed to port pre-existing functionality that used the same logic as the return data from the endpoint.

Adressen register

The address register is the latest application of the Flemish government to search and validate addresses. It has been completely updated and pulled away from CRAB so that it can work with the most recent data. Unfortunately, it does not yet possess the ability to autosuggest addresses. What was important to us is the validation of PO Box information. In the GEOpunt API, only the house number can be validated but the address register also validates the necessary PO Box info.

In this example we used /v1/adresmatch

https://docs.basisregisters.dev-vlaanderen.be/docs/api-documentation.html

Toepassing

Specifically, we have integrated both APIs in the following way. Autosuggestion of addresses is done by the GEOpunt API. It fills in the necessary fields in the form.

Once the data is submitted, it will be validated by the Address Registry API. It will take into account the PO box/apt info you manually provided.

If your address is not correct? It will do the necessary error validation so that the end user knows his/her address does not exist and can make the necessary adjustments.

Address suggestions and validation is something we have already implemented on several projects, such as Brugge TDMS. We also used the same functionalities. Here we created a Vue component in Laravel Nova that suggests and validates addresses based on CRAB format in order to succeed in the database in the correct format. Another good use case for not having to resort to a large GIS provider but to a data point closer to home.

Author: Noah Gillard
PHP / Laravel Developer
Noah Gillard AI generated Face

More insights

Next.js: Just another framework?

About every 10 years, new technology emerges that brings about a change in the way we develop software. Is Next.js this new technology?

Author: Dries Cappon
UX, Design, React.js, Next.js
Dries Cappon
Next.js

Laravel 10 release

The release of Laravel 10: The king of types. Alles wat je moet weten over de nieuwe major release!

Author: Noah Gillard
PHP / Laravel Developer
Noah Gillard AI generated Face
laravel 10 banner

Saloon - Package / SDK API integrations

API integrations for a range of services. Little to no reusable code? With Saloon you turn it into a compact/clean SDK/Package that you can reuse in all your projects and maintain in one place.

Author: Noah Gillard
PHP / Laravel Developer
Noah Gillard AI generated Face
Saloon hero image

Codana wins Digital Champ of the year award 2022

Codana is the winner of the FeWeb Digital Champ award 2022! 

Author: Joris De Groot
Strategic Director and Managing Partner
Joris De Groot
FeWeb Digital Champ award Codana

Life as a React developer at Codana: 1 year in service

"You can start working with us as a React developer!". Bliss! Needless to say, I was super happy to hear this! But, I had never written a line of React before.

Author: Thomas Timmermans
Frontend Developer
Thomas Timmermans
Ik na 1 jaar in dienst

The ideal first workplace

I'm Ward Vandevoort, 22 years old and early November 2021 I started at Codana as a junior backend developer. Discover my story at Codana!

Author: Ward Vandevoort
Developer
Ward Vandevoort
groepsfoto