PHP code example of kryst3q / php-uldk
1. Go to this page and download the library: Download kryst3q/php-uldk 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/ */
kryst3q / php-uldk example snippets
use Kryst3q\PhpUldk\Domain\CoordinateSystem;
use Kryst3q\PhpUldk\Domain\ObjectIdentifier;
use Kryst3q\PhpUldk\Domain\ResponseContentOptions;
use Kryst3q\PhpUldk\PhpUldk;
use Kryst3q\PhpUldk\ValueObject\GeometryFormat;
ions. It depends on them what information will be returned.
$options = new ResponseContentOptions();
$options->setGeometryFormat(new GeometryFormat(GeometryFormat::FORMAT_WKT)); # Default is WKB
$options->setCoordinateSystem(new CoordinateSystem(CoordinateSystem::SRID_4326)); # Default is ESD:2180
$options->requestBoundaryBox();
#$options->requestParcelNumber();
#$options->requestCommuneName();
#$options->requestRegionNameOrNumber();
#$options->requestCountyName();
#$options->requestVoivodeshipName();
#$options->requestObjectIdentifier();
# 4. Make request.
$uldkObject = $uldk->getParcelById($parcelId, $options);
# 5. Read data from UldkObject or UldkObjectCollection classes.
echo $uldkObject->getGeometry()->getGeometry();
echo "\n";
echo $uldkObject->getBoundingBox()->getValue();
echo "\n";
shell script
composer