Skip to content

Gpx metadata type#123

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

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

Conversation

@Raruto

@Raruto Raruto commented Oct 31, 2023

Copy link
Copy Markdown

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

tmcw commented Oct 31, 2023

Copy link
Copy Markdown
Collaborator

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

@Raruto

Raruto commented Nov 2, 2023

Copy link
Copy Markdown
Author

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