EfficiencyJunky / BikeLapse

A webapp built with leaflet.js and mapbox meant to make it easy to catalog bike rides that have been recorded with the DistanceLapse Video Creation System and Strava
4 stars 0 forks source link

Create web frontend to Ingest a GPX file and generate the necessary GeoJSON file #1

Open EfficiencyJunky opened 4 years ago

EfficiencyJunky commented 4 years ago

Need to take the GPX file and create a GeoJSON file that has all the proper pins and metadata required to build the map.

Rename the LineString to "ROUTE"

It should have the following

{
    "type": "Feature",
    "properties": {
        "name": "ROUTE",
        "type": "1",
        "time": "START_TIME_UTC_DATETIME",
        "coordTimes": [list of UTC_DATETIME objects that match with the coordinates in the LineString]
    },
    "geometry": {
        "type": "LineString",
        "coordinates": [list_of_coordinates]
    }
}

Create a Start and End point called "START" and "FINISH"

Add a "DETAILS" Point somewhere in the middle of the route

Add the following metadata key value pair to the top level of the GeoJSON object

    "metadata": {
        "routName":"NAME_OF_THE_ROUTE_TO_BE_DISPLAYED",
        "videoEmbedID": "",
        "googleMapURL": "",
        "stravaURL": "",
        "lineColor": "rgba(62, 146, 204, 1)",
        "lineColorEasy": "green",
        "lineColorHard": "red"
    },