You are here

private function GeoRSS::linestringToGeoRSS in geoPHP 7

Same name and namespace in other branches
  1. 8 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 211

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;
}