placemark/togeojson

View on GitHub
docs/modules.html

Summary

Maintainability
Test Coverage
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>@tmcw/togeojson</title><meta name="description" content="Documentation for @tmcw/togeojson"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script async src="assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base="."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">@tmcw/togeojson</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><h1>@tmcw/togeojson </h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Interfaces</h3><ul class="tsd-index-list"><li class="tsd-kind-interface"><a href="interfaces/Folder.html" class="tsd-kind-icon">Folder</a></li><li class="tsd-kind-interface"><a href="interfaces/KMLOptions.html" class="tsd-kind-icon">KMLOptions</a></li><li class="tsd-kind-interface"><a href="interfaces/Root.html" class="tsd-kind-icon">Root</a></li></ul></section><section class="tsd-index-section "><h3>Type Aliases</h3><ul class="tsd-index-list"><li class="tsd-kind-type-alias"><a href="modules.html#F" class="tsd-kind-icon">F</a></li></ul></section><section class="tsd-index-section "><h3>Functions</h3><ul class="tsd-index-list"><li class="tsd-kind-function"><a href="modules.html#gpx" class="tsd-kind-icon">gpx</a></li><li class="tsd-kind-function"><a href="modules.html#gpxGen" class="tsd-kind-icon">gpx<wbr/>Gen</a></li><li class="tsd-kind-function"><a href="modules.html#kml" class="tsd-kind-icon">kml</a></li><li class="tsd-kind-function"><a href="modules.html#kmlGen" class="tsd-kind-icon">kml<wbr/>Gen</a></li><li class="tsd-kind-function"><a href="modules.html#kmlWithFolders" class="tsd-kind-icon">kml<wbr/>With<wbr/>Folders</a></li><li class="tsd-kind-function"><a href="modules.html#tcx" class="tsd-kind-icon">tcx</a></li><li class="tsd-kind-function"><a href="modules.html#tcxGen" class="tsd-kind-icon">tcx<wbr/>Gen</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Type Aliases</h2><section class="tsd-panel tsd-member tsd-kind-type-alias"><a id="F" class="tsd-anchor"></a><h3 class="tsd-anchor-link">F<a href="#F" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">F<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Feature</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Geometry</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/placemark/togeojson/blob/c556575/lib/shared.ts#L8">shared.ts:8</a></li></ul></aside></section></section><section class="tsd-panel-group tsd-member-group "><h2>Functions</h2><section class="tsd-panel tsd-member tsd-kind-function"><a id="gpx" class="tsd-anchor"></a><h3 class="tsd-anchor-link">gpx<a href="#gpx" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-function"><li class="tsd-signature tsd-kind-icon">gpx<span class="tsd-signature-symbol">(</span>node<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Document</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">FeatureCollection</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/placemark/togeojson/blob/c556575/lib/gpx.ts#L192">gpx.ts:192</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Convert a GPX document to GeoJSON. The first argument, <code>doc</code>, must be a GPX
document as an XML DOM - not as a string. You can get this using jQuery&#39;s default
<code>.ajax</code> function or using a bare XMLHttpRequest with the <code>.response</code> property
holding an XML DOM.</p>
</div><div><p>The output is a JavaScript object of GeoJSON data, same as <code>.kml</code> outputs, with the
addition of a <code>_gpxType</code> property on each <code>LineString</code> feature that indicates whether
the feature was encoded as a route (<code>rte</code>) or track (<code>trk</code>) in the GPX document.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>node: <span class="tsd-signature-type">Document</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">FeatureCollection</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-function"><a id="gpxGen" class="tsd-anchor"></a><h3 class="tsd-anchor-link">gpx<wbr/>Gen<a href="#gpxGen" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-function"><li class="tsd-signature tsd-kind-icon">gpx<wbr/>Gen<span class="tsd-signature-symbol">(</span>node<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Document</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Generator</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Feature</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/placemark/togeojson/blob/c556575/lib/gpx.ts#L164">gpx.ts:164</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Convert GPX to GeoJSON incrementally, returning
a <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators">Generator</a>
that yields output feature by feature.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>node: <span class="tsd-signature-type">Document</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Generator</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Feature</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-function"><a id="kml" class="tsd-anchor"></a><h3 class="tsd-anchor-link">kml<a href="#kml" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-function"><li class="tsd-signature tsd-kind-icon">kml<span class="tsd-signature-symbol">(</span>node<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Document</span>, options<span class="tsd-signature-symbol">?: </span><a href="interfaces/KMLOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">KMLOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">FeatureCollection</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Geometry</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/placemark/togeojson/blob/c556575/lib/kml.ts#L269">kml.ts:269</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Convert a KML document to GeoJSON. The first argument, <code>doc</code>, must be a KML
document as an XML DOM - not as a string. You can get this using jQuery&#39;s default
<code>.ajax</code> function or using a bare XMLHttpRequest with the <code>.response</code> property
holding an XML DOM.</p>
</div><div><p>The output is a JavaScript object of GeoJSON data. You can convert it to a string
with <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify">JSON.stringify</a>
or use it directly in libraries.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>node: <span class="tsd-signature-type">Document</span></h5></li><li><h5>options: <a href="interfaces/KMLOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">KMLOptions</a><span class="tsd-signature-symbol"> = ...</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">FeatureCollection</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Geometry</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-function"><a id="kmlGen" class="tsd-anchor"></a><h3 class="tsd-anchor-link">kml<wbr/>Gen<a href="#kmlGen" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-function"><li class="tsd-signature tsd-kind-icon">kml<wbr/>Gen<span class="tsd-signature-symbol">(</span>node<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Document</span>, options<span class="tsd-signature-symbol">?: </span><a href="interfaces/KMLOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">KMLOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Generator</span><span class="tsd-signature-symbol">&lt;</span><a href="modules.html#F" class="tsd-signature-type" data-tsd-kind="Type alias">F</a><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/placemark/togeojson/blob/c556575/lib/kml.ts#L241">kml.ts:241</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Convert KML to GeoJSON incrementally, returning
a <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators">Generator</a>
that yields output feature by feature.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>node: <span class="tsd-signature-type">Document</span></h5></li><li><h5>options: <a href="interfaces/KMLOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">KMLOptions</a><span class="tsd-signature-symbol"> = ...</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Generator</span><span class="tsd-signature-symbol">&lt;</span><a href="modules.html#F" class="tsd-signature-type" data-tsd-kind="Type alias">F</a><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-function"><a id="kmlWithFolders" class="tsd-anchor"></a><h3 class="tsd-anchor-link">kml<wbr/>With<wbr/>Folders<a href="#kmlWithFolders" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-function"><li class="tsd-signature tsd-kind-icon">kml<wbr/>With<wbr/>Folders<span class="tsd-signature-symbol">(</span>node<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Document</span>, options<span class="tsd-signature-symbol">?: </span><a href="interfaces/KMLOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">KMLOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="interfaces/Root.html" class="tsd-signature-type" data-tsd-kind="Interface">Root</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/placemark/togeojson/blob/c556575/lib/kml.ts#L177">kml.ts:177</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Yield a nested tree with KML folder structure</p>
</div><div><p>This generates a tree with the given structure:</p>
<pre><code class="language-js"><span class="hl-0">{</span><br/><span class="hl-0">  </span><span class="hl-1">&quot;type&quot;</span><span class="hl-0">: </span><span class="hl-1">&quot;root&quot;</span><span class="hl-0">,</span><br/><span class="hl-0">  </span><span class="hl-1">&quot;children&quot;</span><span class="hl-0">: [</span><br/><span class="hl-0">    {</span><br/><span class="hl-0">      </span><span class="hl-1">&quot;type&quot;</span><span class="hl-2">:</span><span class="hl-0"> </span><span class="hl-1">&quot;folder&quot;</span><span class="hl-0">,</span><br/><span class="hl-0">      </span><span class="hl-1">&quot;meta&quot;</span><span class="hl-2">:</span><span class="hl-0"> {</span><br/><span class="hl-0">        </span><span class="hl-1">&quot;name&quot;</span><span class="hl-2">:</span><span class="hl-0"> </span><span class="hl-1">&quot;Test&quot;</span><br/><span class="hl-0">      },</span><br/><span class="hl-0">      </span><span class="hl-1">&quot;children&quot;</span><span class="hl-2">:</span><span class="hl-0"> [</span><br/><span class="hl-0">         </span><span class="hl-3">// ...features and folders</span><br/><span class="hl-0">      ]</span><br/><span class="hl-0">    }</span><br/><span class="hl-0">    </span><span class="hl-3">// ...features</span><br/><span class="hl-0">  ]</span><br/><span class="hl-0">}</span>
</code></pre>

<a href="#groundoverlay" id="groundoverlay" style="color: inherit; text-decoration: none;">
  <h3>GroundOverlay</h3>
</a>
<p>GroundOverlay elements are converted into
<code>Feature</code> objects with <code>Polygon</code> geometries,
a property like:</p>
<pre><code class="language-json"><span class="hl-0">{</span><br/><span class="hl-0">  </span><span class="hl-4">&quot;@geometry-type&quot;</span><span class="hl-0">: </span><span class="hl-1">&quot;groundoverlay&quot;</span><br/><span class="hl-0">}</span>
</code></pre>
<p>And the ground overlay&#39;s image URL in the <code>href</code>
property. Ground overlays will need to be displayed
with a separate method to other features, depending
on which map framework you&#39;re using.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>node: <span class="tsd-signature-type">Document</span></h5></li><li><h5>options: <a href="interfaces/KMLOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">KMLOptions</a><span class="tsd-signature-symbol"> = ...</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="interfaces/Root.html" class="tsd-signature-type" data-tsd-kind="Interface">Root</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-function"><a id="tcx" class="tsd-anchor"></a><h3 class="tsd-anchor-link">tcx<a href="#tcx" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-function"><li class="tsd-signature tsd-kind-icon">tcx<span class="tsd-signature-symbol">(</span>node<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Document</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">FeatureCollection</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/placemark/togeojson/blob/c556575/lib/tcx.ts#L200">tcx.ts:200</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Convert a TCX document to GeoJSON. The first argument, <code>doc</code>, must be a TCX
document as an XML DOM - not as a string.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>node: <span class="tsd-signature-type">Document</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">FeatureCollection</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-function"><a id="tcxGen" class="tsd-anchor"></a><h3 class="tsd-anchor-link">tcx<wbr/>Gen<a href="#tcxGen" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-function"><li class="tsd-signature tsd-kind-icon">tcx<wbr/>Gen<span class="tsd-signature-symbol">(</span>node<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Document</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Generator</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Feature</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/placemark/togeojson/blob/c556575/lib/tcx.ts#L184">tcx.ts:184</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Incrementally convert a TCX document to GeoJSON. The
first argument, <code>doc</code>, must be a TCX
document as an XML DOM - not as a string.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>node: <span class="tsd-signature-type">Document</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Generator</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Feature</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class="current"><a href="modules.html">Exports</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="tsd-kind-interface"><a href="interfaces/Folder.html" class="tsd-kind-icon">Folder</a></li><li class="tsd-kind-interface"><a href="interfaces/KMLOptions.html" class="tsd-kind-icon">KMLOptions</a></li><li class="tsd-kind-interface"><a href="interfaces/Root.html" class="tsd-kind-icon">Root</a></li><li class="tsd-kind-type-alias"><a href="modules.html#F" class="tsd-kind-icon">F</a></li><li class="tsd-kind-function"><a href="modules.html#gpx" class="tsd-kind-icon">gpx</a></li><li class="tsd-kind-function"><a href="modules.html#gpxGen" class="tsd-kind-icon">gpx<wbr/>Gen</a></li><li class="tsd-kind-function"><a href="modules.html#kml" class="tsd-kind-icon">kml</a></li><li class="tsd-kind-function"><a href="modules.html#kmlGen" class="tsd-kind-icon">kml<wbr/>Gen</a></li><li class="tsd-kind-function"><a href="modules.html#kmlWithFolders" class="tsd-kind-icon">kml<wbr/>With<wbr/>Folders</a></li><li class="tsd-kind-function"><a href="modules.html#tcx" class="tsd-kind-icon">tcx</a></li><li class="tsd-kind-function"><a href="modules.html#tcxGen" class="tsd-kind-icon">tcx<wbr/>Gen</a></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="assets/main.js"></script></body></html>