private function GeoJSON::objToGeom in geoPHP 8
Same name and namespace in other branches
- 7 geoPHP/lib/adapters/GeoJSON.class.php \GeoJSON::objToGeom()
2 calls to GeoJSON::objToGeom()
- GeoJSON::objToGeometryCollection in geoPHP/
lib/ adapters/ GeoJSON.class.php - GeoJSON::read in geoPHP/
lib/ adapters/ GeoJSON.class.php - Given an object or a string, return a Geometry
File
- geoPHP/
lib/ adapters/ GeoJSON.class.php, line 47
Class
- GeoJSON
- GeoJSON class : a geojson reader/writer.
Code
private function objToGeom($obj) {
$type = $obj->type;
if ($type == 'GeometryCollection') {
return $this
->objToGeometryCollection($obj);
}
$method = 'arrayTo' . $type;
return $this
->{$method}($obj->coordinates);
}