PHP code example of urban-brussels / bru-tools
1. Go to this page and download the library: Download urban-brussels/bru-tools library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
urban-brussels / bru-tools example snippets
// Le point est-il situé dans un "Contrat de Quartier Durable" ?
$coordinates = "POINT(147000 171000)"; // Lat / Lon in WKT format
$crs = 31370; // Coordinate Reference System (31370 for Lambert 72 - 4386 for WGS84)
$actif = false; // If true, retrieves only active CQD
$cqd = UrbanLayers::getCqdFromGeom($coordinates, $crs, $actif);
echo "<pre>";
print_r($cqd);
echo "</pre>";
// Array
// (
// [0] => Array
// (
// [ID_DRU] => 51
// [NOM_FR] => Ecluse - Saint-Lazare
// [NOM_NL] => Sluis-Sint-Lazarius
// [DT_DEBUT] => 2008-12-23
// [DT_FIN] => 2012-12-22
// )
//
// [1] => Array
// (
// [ID_DRU] => 11
// [NOM_FR] => Duchesse de Brabant
// [NOM_NL] => Hertogin van Brabant
// [DT_DEBUT] => 1999-06-16
// [DT_FIN] => 2003-06-15
// )
// )
to do