Lines Matching refs:geometry
37 * Read GeoRSS string into geometry objects
51 * @param Geometry $geometry
55 public function write(Geometry $geometry, $namespace = false)
61 return $this->geometryToGeoRSS($geometry) ?: '';
182 // @@TODO: Add good support once we have circular-string geometry support
195 * @param Geometry $geometry
198 protected function geometryToGeoRSS($geometry)
200 $type = $geometry->geometryType();
203 return $this->pointToGeoRSS($geometry);
206 return $this->linestringToGeoRSS($geometry);
209 return $this->PolygonToGeoRSS($geometry);
215 return $this->collectionToGeoRSS($geometry);
221 * @param Geometry $geometry
224 private function pointToGeoRSS($geometry)
226 return '<' . $this->nss . 'point>' . $geometry->y() . ' ' . $geometry->x() . '</' . $this->nss . 'point>';
230 * @param LineString $geometry
233 private function linestringToGeoRSS($geometry)
236 foreach ($geometry->getComponents() as $k => $point) {
238 if ($k < ($geometry->numGeometries() - 1)) {
247 * @param Polygon $geometry
250 private function polygonToGeoRSS($geometry)
253 $exteriorRing = $geometry->exteriorRing();
265 * @param Collection $geometry
268 public function collectionToGeoRSS($geometry)
271 $components = $geometry->getComponents();