-
Notifications
You must be signed in to change notification settings - Fork 293
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
Geofencing refactor #404
Comments
I would like to offer a few suggestions to for the Geofencing refactor effort. Below you'll find our ideas, please feel free to ask for more details if needed.
|
Tagging those who had interest in this topic at the Developer's Workshop: @cmonagle @viestat @richtaylor-ito @nbdh @freemvmt @balazsczap @ezmckinn @testower |
Adam from TIER: we are generally welcome the proposed changes, as it would maintain consistency with GeoJSON spec and clarify rules applications. On the other hand, though, we support @mtborges alternative suggestions, especially on the first 2 points. We need to use feeds with multiple service areas in them, exterior rules would be problematic to manage (2) in those feeds due to overlapping issues (ofc rule priorities would help here but still hard to manage). This comes together with the "disallowed if not present" point (1), we do support that as well. (4) and (5) points are nice to have either. Would be interested in other opinions as well on this topic! |
Can you elaborate on what you mean by "disallowed"? On item number 2, it's common practice to allow users to take vehicles outside the service area so I don't think you can call this an edge case, here's an example on Rotterdam https://nl.go-sharing.com/en/bikesharing/ On item number 4, I'm not sure I understand the combination of Enum and Boolean and how that's simpler. For example, how would you handle the max speed rule which is an integer, not a boolean? Can you give an example? Also the mandatory station parking area rule has already passed in #349. On item 5, I agree these need to change. I didn't include it in the video above. I think starting and ending of rentals should be separate rules, for example |
@mplsmitch, thank you so much for making such a clear explanation of the problem and the proposed solution. I feel it really represents what was discussed in the workshop! Form Dott's perspective here are our comments: New fieldsClassificationThis is an interesting concept, I think that this would be useful to prevent confusion regarding which polygon is what, but I think we should take a step forward (or back would be more accurate :D) and consider that since OrientationI think more often than not, applying rules to the outside make things more complicated. Particularly in the case of two (relatively) near If we assume anything outside of a ExpressivenessThere is also the need to have more expressive configuration flags to accurately describe our business model, so I am happy to see that in the previous comments this has already been addressed/flagged. In general it would be great to indeed split start and end ride. |
Regarding the disallowing of anything outside the service area polygon, here are a couple of examples of systems that explicitly allow vehicles to travel outside service areas. This example comes from Go sharing which rents mopeds, ebikes and cars in the Netherlands: This example comes from ShareNow which operates car sharing all over Europe: In both of these examples, users are permitted to leave the service area but are prohibited from ending rentals outside of it. On the original "holes" approach, nothing in the above proposal would prohibit holes in a polygon if the use case called for them. The intention was to do away with the coordinate orientation as a means of distinguishing between services areas and limitation areas. The feedback we got was that applying rules to negative space (holes) was confusing and not consistently applied. For example, if for whatever reason the publisher didn't define a service area, only limitation areas, then the order of limitation area points would often be reversed to comply with the geoJSON spec which requires that the first ring in any polygon be counter-clockwise. This could be addressed by requiring a service area polygon in all geofencing files but as there are many examples of systems that allow vehicles to leave the service area, it seems like there might also be cases where limitation areas would be defined outside of the service area polygon. If we define limitation areas as clockwise (holes) then any limitation areas outside the service area would be out of compliance with the GeoJSON RFC. Since this issue with the application of rules to the outside of polygons is a result of aggregating data sets, couldn't there be a way to associate geofence rules with the systems for which they are published and not apply them to vehicles from other data sets? Geofencing isn't the only business rule that differs across systems in different geographies - for example you might have differences in pricing, dates and hours of operation, system alerts etc and those aren't causing problems for aggregators, at least not that i'm aware of. What if we changed |
Answers inline to a few comments above:
Our suggestion is that for providers that add any
This is a good point on providers allowing rides outside service areas, but we still stand by the argument that having geofences rules applying to internal and external areas is confusing and creates unnecessary complexity to both GBFS producers and data consumers. For a situation where you can ride outside the regular business or park area, providers can add a sufficiently large ride area defined as a geofence. Sometimes this type of roaming is explicitly limited on the provider's website. ShareNow actually calls this out on their FAQ:
This particular example would use a list of multiple rules. It would apply only to boolean fields (not max speed, then), making it easier to expand that list in the future. One example (the name
100% agreed. I believe having rules on the outside of the geofence makes interpretation of rules, feed production and feed consumption more complex overall. The two approaches (using GeoJSON holes and explicit orientations) are different in format, but they retain the main source of confusion and complexity with outside rules.
This would probably help a lot, but I believe it would be a broader discussion about how to represent multiple systems in a single GBFS feed set. |
TheShareNow example above is an extreme case but according the the chart, if the car were rented in Italy a geofence covering a "sufficiently large ride area" would have to include Switzerland, Austria, Germany, France, Luxembourg and Lichtenstein. Given that:
users would be prohibited from driving in any of those countries unless they were included in the geofencing_zones file. I'm all in favor of making things less complicated but needing to explicitly allow everything seems much more complicated than applying limitations. Even in the example above it says:
What happens when an operator allows scooter rides throughout a service area that has a highway running through it where they are prohibited by law? If rules are based in limitations in stead of allowances, you can make the argument that there may be places where it's not appropriate to ride that aren't covered by the geofencing file. If you're explicitly saying that something is "allowed" where it shouldn't be like a highway or private property, that's a much harder case to make. |
This was discussed at the Mobility Data Developer's Workshop today, here are some notes from where we landed:
|
Closing this issue since it has now been resolved by #481 |
MobilityData has been working on a refactor of the
geofencing_zones.json
file. The geofencing endpoint was added to the specification starting with v2.1 in early 2020. Since that time we've heard that it's has been a source of confusion for both data producers and consumers. Before opening a PR, we'd like to solicit feedback on a proposed solution. Because this has been a difficult topic for people to get their heads around, we've outlined our proposal in this explainer video. Please have a look and let us know what you think.geofenicing-proposal-57.mp4
If there's general agreement to go forward with this approach, we'll open a PR and try to roll it into v3.0. If that's not that case we'll go ahead with the v3.0 release as-is and push the refactor of geofencing to a later release.
Is your potential solution a breaking change?
The text was updated successfully, but these errors were encountered: