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

The difference between data management and data processing in a digital economy

Gegevens zijn cruciaal voor bedrijven en het begrijpen van de verschillen tussen gegevensbeheer en gegevensverwerking kan verwarrend zijn. In dit artikel zullen we deze verschillen in de digitale economie nader bekijken om hun doelen en toepassingen beter te begrijpen.

Author: Tom Van den Eynden
Web Architect | Coordinator
Tom Van den Eynden
gegevensverwerking

Test Driven Development - application to a project

TDD, or in full Test Driven Development, is an approach to development where we start from writing tests.

Author: Sarah Jehin
PHP developer
Sarah Jehin
development

Securing Laravel 101

In this blog post, we're gonna take a closer look at some common Laravel security mistakes.

Author: Robbe Reygel
PHP developer
laravel

The future of Web applications: what can we expect?

In recent years, Web applications have undergone a tremendous evolution. But what does the future hold for us? You'll discover it all in this blog.

Author: Tom Van den Eynden
Web Architect | Coordinator
Tom Van den Eynden
computerscherm met code

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