Skip to content

Gpx metadata type#123

Draft
Raruto wants to merge 2 commits intoplacemark:mainfrom
Raruto:gpx-metadata
Draft

Gpx metadata type#123
Raruto wants to merge 2 commits intoplacemark:mainfrom
Raruto:gpx-metadata

Conversation

@Raruto
Copy link

@Raruto Raruto commented Oct 31, 2023

Hi Tom,

here's a draft based on: #111 (comment), that is, add a dedicated "empty" feature identified by the "_gpxType": "metadata" property:

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [ ]     // eventually populated by https://www.topografix.com/GPX/1/1/#type_boundsType
      },
      "properties": {
        "_gpxType": "metadata" // everything else related to https://www.topografix.com/GPX/1/1/#type_metadataType
        "name": "...",
        "desc": "...",
        "author": {
            "name": "...",
            "email": "",
            "link": {
               "href": "...",
               "text": "...",
               "type": "...",
            }
        },
        "copyright": {
          "author": "...",
          "year": "...",
          "license": "..."
        },
        "time": "...",
        "keywords": "...",
        "extensions": ??
    },
    {
      // Other features
    }
  ]
}

Let me know, so I'll eventually update the tests accordingly.

👋 Raruto

@tmcw
Copy link
Collaborator

tmcw commented Oct 31, 2023

Thanks! I'd really much rather expose a method like getGpxData rather than having a feature with magical meaning, would that be possible?

@Raruto
Copy link
Author

Raruto commented Nov 2, 2023

expose a method like getGpxData rather than having a feature with magical meaning

I was trying to keep it simple (and quickly testable)

From my point of view rte features are quite similar:

"properties": {
"_gpxType": "rte",
"name": "route name",
"time": "2007-11-25T17:58:00Z",
},

Also regarding data portability I'd rather prefer find a fairly common way of handling this.

It's already quite easy to build an out-of-spec geojson (or at least without relying on other external libraries).

If implemented here (as a static information) you'd at least be pretty sure that it's a quite valid thing

Anyway, i think the final decision is up to you..

👋 Raruto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants