Lines Matching refs:geom
81 $geom = $this->geomFromXML($xmlObject);
82 if ($geom->isEmpty()) {
96 $geom = $this->read($gpx, $allowedElements);
103 return $geom;
360 * @param Point $geom
364 private function pointToGPX($geom, $tag = 'wpt')
366 if ($geom->isEmpty() || ($tag === 'wpt' && !in_array($tag, $this->gpxTypes->get('gpxType')))) {
371 if ($geom->hasZ() || $geom->getData() !== null) {
372 $node = $indent . "<" . $this->nss . $tag . " lat=\"" . $geom->getY() . "\" lon=\"" . $geom->getX() . "\">\n";
373 if ($geom->hasZ()) {
374 $geom->setData('ele', $geom->z());
376 $node .= self::processGeometryData($geom, $this->gpxTypes->get($tag . 'Type'), $indent . "\t") .
378 if ($geom->hasZ()) {
379 $geom->setData('ele', null);
383 return $indent . "<" . $this->nss . $tag . " lat=\"" . $geom->getY() . "\" lon=\"" . $geom->getX() . "\" />\n";
392 * @param LineString|MultiLineString $geom
395 private function linestringToGPX($geom)
397 $isTrack = $geom->getData('gpxType') === 'route' ? false : true;
398 if ($geom->isEmpty() || !in_array($isTrack ? 'trk' : 'rte', $this->gpxTypes->get('gpxType'))) {
405 $gpx = "<" . $this->nss . "trk>\n" . self::processGeometryData($geom, $this->gpxTypes->get('trkType'));
406 $components = $geom->geometryType() === 'LineString' ? [$geom] : $geom->getComponents();
419 $gpx = "<" . $this->nss . "rte>\n" . self::processGeometryData($geom, $this->gpxTypes->get('rteType'));
420 foreach ($geom->getPoints() as $point) {