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

if an operator only has two stops, its convex hull is a LineString rather than a Polygon #714

Closed
drewda opened this issue Jul 28, 2016 · 1 comment · Fixed by #757
Closed

Comments

@drewda
Copy link
Member

drewda commented Jul 28, 2016

This problem first came up with the NYC DOT, which operates the Staten Island Ferry (https://transit.land/feed-registry/operators/o-dr5r7-nycdot). It only has two stops, at the ends of the ferry route; its operator geometry (convex hull) has been computed as a LineString with just two points. This makes it complicated to parse client-side, if you're not guaranteed a polygon.

For the time being, we're manually edited the operator geometry to be a polygon: https://transit.land/dispatcher/changesets/2108

In the future, let's look into adding a buffer around stops so that an operator with only two stops gets a polygon.

Timeframe: Not urgent.

@doublestranded
Copy link
Contributor

factory = RGeo::Cartesian.factory(
srid: 4326, buffer_resolution: 8
)
line = factory.line_string([factory.point(1,2),factory.point(2,2])
line.buffer(0.5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants