25require_once DOL_DOCUMENT_ROOT.
'/includes/geoPHP/geoPHP.inc.php';
57 $geom = geoPHP::load($value,
'wkt');
59 $geojson = $geom->out(
'json');
60 $centroid = $geom->getCentroid();
61 $centroidjson = $centroid->out(
'json');
63 return array(
'geojson' => $geojson,
'centroid' => $centroid,
'centroidjson' => $centroidjson);
79 $geom = geoPHP::load($value,
'wkt');
81 $value = $geom->x().
' '.$geom->y();
96 $geom = geoPHP::load($value,
'wkt');
98 $value = get_class($geom) .
' : '. $geom->numPoints() .
' Points';
113 $geom = geoPHP::load($geojson,
'json');
115 $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.