placemark / togeojson

convert KML, TCX, and GPX to GeoJSON, without the fuss
https://placemark.github.io/togeojson/
BSD 2-Clause "Simplified" License
409 stars 67 forks source link

Unexpected link to online shop in dist/lib #114

Closed Dodje closed 1 year ago

Dodje commented 1 year ago

I'm wondering, why would the library parse the site

https://unpkg.com/@tmcw/togeojson@5.7.0/dist/togeojson.es.mjs?module https://github.com/placemark/togeojson/blob/578fdb52e2bab47ce4f5908fbdf9739eef19ed5d/lib/gpx/properties.ts#L15 http://www.garmin.com/xmlschemas/GpxExtensions/v3

image

tmcw commented 1 year ago

The library isn't parsing that site: that's an XML namespace declaration for the gpxx namespace. It doesn't link to that or parse it - the URL is just a weird way to be specific about what gpxx means.

You can see that this is pretty standard, it's even on the example GPX on the Wikipedia page for GPX, and the documentation for gpxx extensions in Safe's docs.

Anyway, it's weird, but it's what all GPX files that use the gpxx extension do, and it's not a link and isn't being parsed or fetched in any way. This is just how XML namespaces work and the particular namespace used for that GPX extension.