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

Standardize location data to GeoJSON #530

Closed
1 of 3 tasks
pgiki opened this issue Aug 17, 2023 · 6 comments
Closed
1 of 3 tasks

Standardize location data to GeoJSON #530

pgiki opened this issue Aug 17, 2023 · 6 comments

Comments

@pgiki
Copy link

pgiki commented Aug 17, 2023

I am proposing standardizing the location-related data for v3.0-RC. This proposed change will lead to replacing the lat and lon fields with 1 GeoJSON Point field. The GeoJSON format is a well-known standard for sharing GIS data. In addition, GeoJSON is already used on the GBFS specifications in defining geofences and station areas.

Please describe some potential solutions you have considered (even if they aren’t related to GBFS).

Standard all location-related data (lat and lon) to GeoJSON on vehicle_status.json and station_information.json

Is your potential solution a breaking change?

  • Yes
  • No
  • Unsure

Below is an example of how lat and lon would be changed for the station information example.

    "last_updated": 1640887163,
    "ttl": 0,
    "version": "3.0-RC",
    "data": {
        "stations": [
            {
                "station_id": "station12",
                "name": [
                    {
                        "text": "SE Belmont & SE 10th",
                        "language": "en"
                    }
                ],
                "location": {
                    "coordinates": [
                        -122.655775,
                        45.516445
                    ],
                    "type": "Point"
                },
                "is_valet_station": false,
                "is_virtual_station": true,
                "is_charging_station": false,
                "station_area": {
                    "type": "MultiPolygon",
                    "coordinates": [
                        [
                            [
                                [
                                    -122.655775,
                                    45.516445
                                ],
                                [
                                    -122.655705,
                                    45.516445
                                ],
                                [
                                    -122.655705,
                                    45.516495
                                ],
                                [
                                    -122.655775,
                                    45.516495
                                ],
                                [
                                    -122.655775,
                                    45.516445
                                ]
                            ]
                        ]
                    ]
                },
                "capacity": 16,
                "vehicle_type_area_capacity": [
                    {
                        "vehicle_type_id": "abc123",
                        "count": 7
                    },
                    {
                        "vehicle_type_id": "def456",
                        "count": 8
                    }
                ]
            }
        ]
    }
}```
@josee-sabourin
Copy link
Contributor

tagging for more visibility
@kulovan @cmonagle @futuretap @ezmckinn @bdferris-v2 @hynick4 @testower @fbouchPBSC @rickbruce
@AntoineAugusti @Cj-Malone

@futuretap
Copy link
Contributor

As far as I understand, station_area is already in GeoJSON format. In my opinion, converting lat, lon to GeoJSON doesn't make sense as long as we require type to be Point. Then we'd just add needless clutter.

@AntoineAugusti
Copy link
Contributor

I don't see a clear added benefit to this breaking change

@pgiki
Copy link
Author

pgiki commented Aug 29, 2023

My argument is that if both station_area and lat and lon represent location details why not standardize all these location-related attributes on GBFS to GeoJSON which is already partially used on the specs anyway?

@mplsmitch
Copy link
Collaborator

The current WGS84 format is widely used (including by GeoJSON) and generally understood. While GeoJSON is great for defining polygons, I don't think it would add value to define these as GeoJSON points.
In the example above, what is currently handled in 2 lines becomes 7 lines in GeoJSON, If you apply that to vehicle_status.json even a relatively small fleet of 500 vehicles would need an additional 2,500 lines.

@pgiki
Copy link
Author

pgiki commented Aug 29, 2023

Thank you, @mplsmitch for bringing up the topic of efficiency/bandwidth (fewer lines) versus consistency (standardizing locations using WGS84 format). If others also agree with this approach, I'm happy to consider this matter resolved unless there are any objections within the next 24 hours.

@pgiki pgiki closed this as completed Sep 2, 2023
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

5 participants