phayes / geoPHP

Advanced geometry operations in PHP
https://geophp.net
Other
861 stars 262 forks source link

GPX to KML conversion problem #166

Open giuliogatto opened 5 years ago

giuliogatto commented 5 years ago

Hello, I am doing what is described in this issue: https://github.com/phayes/geoPHP/issues/17

But what I get is this:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Document>
    <name>IT001</name>
    <Placemark>
      <name>IT001</name>
      <description>Track converted from GPX</description>
         <MultiGeometry><Point><coordinates>11.423035,45.897655</coordinates></Point><Point><coordinates>11.423035,45.897655</coordinates></Point>..

With tags, which don't seem to be correct KML. So it looks like the line: $linestring = $geometry->out('kml'); Is not outputting correct KML tags.. am I doing something wrong here? Do I need another layer of conversion? Thanks in advance to anyone who can help with this!