Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Replace start_point,end_point, start_time, end_time, route, and sample rate with route containing timestamp #19

Closed
dmklinger opened this issue Jun 25, 2018 · 4 comments

Comments

@dmklinger
Copy link
Contributor

First and last points in route are start and end; all points in route are marked with timestamps.

@dmklinger
Copy link
Contributor Author

It would look something like this:

{
    "company_name": "ScooterCompany",
    "device_type": "scooter",
    "trip_id": 107384,
    "trip_duration": 124.8681321144104,
    "trip_distance": 321.869243535,
    "route": {
        "type": "FeatureCollection",
        "features": [
            {
                "type": "Feature",
                "properties": {
                    "timestamp": 1529968782.421409
                },
                "geometry": {
                    "type": "Point",
                    "coordinates": [
                        -118.46710503101347,
                        33.9909333514159
                    ]
                }
            },
            {
                "type": "Feature",
                "properties": {
                    "timestamp": 1531007628.3774529
                },
                "geometry": {
                    "type": "Point",
                    "coordinates": [
                        -118.464851975441,
                        33.990366257735
                    ]
                }
            },
            {
                "type": "Feature",
                "properties": {
                    "timestamp": 1532046474.333497
                },
                "geometry": {
                    "type": "Point",
                    "coordinates": [
                        -118.46594363451004,
                        33.99065981258349
                    ]
                }
            },
            {
                "type": "Feature",
                "properties": {
                    "timestamp": 1529968907.289541
                },
                "geometry": {
                    "type": "Point",
                    "coordinates": [
                        -118.46710503101347,
                        33.9909333514159
                    ]
                    
                }
            }
        ]
    },
    "accuracy": 6,
    "device_id": 8745531,
    "parking_verification": "urlhere",
    "standard_cost": 0.05,
    "actual_cost": 1.15
}

@thekaveman
Copy link
Collaborator

@kevinsmgov and I were discussing along similar lines (pun intended!)

He brought up the GPX data format, which might be applicable here.

@dmklinger
Copy link
Contributor Author

dmklinger commented Jun 26, 2018

Can GPX be done in JSON? (Probably not) I like this way also b/c then Route is valid GeoJSON and can be exported to MapBox (or whatever we want) relatively easily without having to pull a bunch of fields

I also think it is relatively flexible in allowing for a variety of input methods: it doesn't matter what rate they poll the device (the polling can be irregular) or how often. It allows us to see exactly whether interpolation makes sense rather than requiring interpolation from the onset.

@thekaveman
Copy link
Collaborator

Yes, I agree... my comment about GPX wasn't so much that it should literally be the format here (as you rightly point out, it is an XML format not JSON). But more along the lines of what you're already proposing: a series of timestamps with associated GPS location.

Agree on all your points, and this definitely seems like a more useful representation that the individual start_point, end_point, etc.

hunterowens added a commit that referenced this issue Jul 2, 2018
schnuerle pushed a commit that referenced this issue Apr 28, 2022
…ip_start_location

Add requested_trip_start_location
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

No branches or pull requests

2 participants