1. Go to this page and download the library: Download prezent/phpwktadapter 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/ */
prezent / phpwktadapter example snippets
andesmedt\PHPWKTAdapter\WKTAdapter;
$adapter = new WKTAdapter();
$res = $adapter->read('SRID=31370;POINT(30 10)');
var_dump($res);
array(
// the geometry object type
"type" => string,
// integer or float values for POINT - nested array (integer or float) for other geometry types
"value" => array,
// integer representing the EWKT SRID, null when not present
"srid" => integer | null,
// string (Z, M or ZM) representing the dimension, null when not present
"dimension" => string | null
)
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.