private function GeoRSS::linestringToGeoRSS in geoPHP 8
Same name and namespace in other branches
- 7 geoPHP/lib/adapters/GeoRSS.class.php \GeoRSS::linestringToGeoRSS()
1 call to GeoRSS::linestringToGeoRSS()
- GeoRSS::geometryToGeoRSS in geoPHP/
lib/ adapters/ GeoRSS.class.php
File
- geoPHP/
lib/ adapters/ GeoRSS.class.php, line 195
Class
- GeoRSS
- PHP Geometry/GeoRSS encoder/decoder
Code
private function linestringToGeoRSS($geom) {
$output = '<' . $this->nss . 'line>';
foreach ($geom
->getComponents() as $k => $point) {
$output .= $point
->getY() . ' ' . $point
->getX();
if ($k < $geom
->numGeometries() - 1) {
$output .= ' ';
}
}
$output .= '</' . $this->nss . 'line>';
return $output;
}