Skip to content

PHP class to access geographical databases of the Brussels-Capital Region

Notifications You must be signed in to change notification settings

ici-be/urbis-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 

Repository files navigation

urbis-php

UrbIS®© comprises a set of geographical databases of the Brussels-Capital Region and online services enabling the convenient use of these data.

urbis-php gives developpers a tool to use it easily with PHP.

Install

The tool only requires PHP 7.0+ and guzzlehttp/guzzle.

Use it via composer + packagist: https://packagist.org/packages/ici-brussels/urbis-php

Usage

$urbis = new Urbis_Geoloc();

// Find relevant address according to input
/* Option 1: Structured */
$urbis->getAddress_Structured("rue américaine", "25", "1060", "fr");
/* Option 2: Unstructured */
$urbis->getAddress_Unstructured("rue américaine 25", "fr");

// get array with validated address
$result = $urbis->getStructuredAddress();
print_r($result);
/*
Array
(
    [StreetName] => Rue Américaine
    [StreetNumber] => 25
    [PostalCode] => 1060
    [MunicipalityName] => Saint-Gilles
)
*/

// get array with latitude/longitude
$result = $urbis->getGeographicalLocation();
print_r($result);
/*
Array
(
    [lat] => 50.824197276153
    [lon] => 4.3554360355926
)
*/

Credits

  • Created by Bruno Veyckemans (ici Bruxelles). All comments and suggestions welcome !
  • Realized by means of Brussels UrbIS®© - CIRB

About

PHP class to access geographical databases of the Brussels-Capital Region

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages