26require_once DOL_DOCUMENT_ROOT.
'/includes/geoPHP/geoPHP.inc.php';
58 $geom = geoPHP::load($value,
'wkt');
60 '@phan-var-force Geometry $geom';
61 $geojson = $geom->out(
'json');
62 $centroid = $geom->getCentroid();
63 '@phan-var-force Geometry $centroid';
64 $centroidjson = $centroid->out(
'json');
66 return array(
'geojson' => $geojson,
'centroid' => $centroid,
'centroidjson' => $centroidjson);
82 $geom = geoPHP::load($value,
'wkt');
84 '@phan-var-force Geometry $geom';
85 $value = $geom->x().
' '.$geom->y();
100 $geom = geoPHP::load($value,
'wkt');
102 '@phan-var-force Geometry $geom';
103 $value = get_class($geom) .
' : '. $geom->numPoints() .
' Points';
118 $geom = geoPHP::load($geojson,
'json');
120 '@phan-var-force Geometry $geom';
121 $value_key = $geom->out(
'wkt');
Class to manage Geo processing Usage: $dolgeophp=new DolGeoPHP($db);.
parseGeoString($value)
Return data from a value.
getPointString($value)
Return a string with x and y.
getWkt($geojson)
Return wkt.
__construct($db)
Create an object to build an HTML area to edit a large string content.
getXYString($value)
Return a string with x and y.