/** * @param \stdClass $geojson * * @return GeoJson */ public static function fromGeoJson(\stdClass $geojson) { $gj = new self(); foreach ($geojson->features as $feature) { $gj->addFeature(Feature::fromGeoJson($feature->coordinates)); } return $gj; }