-
Notifications
You must be signed in to change notification settings - Fork 42
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
Input waypoints #11
Comments
Seems to me that we've got to support at least these two inputs:
Let's put other possible inputs (GeoJSON geometries) aside for now. To generate a list of waypoints from a list of addresses, a user needs to make multiple geocoding requests, select from multiple results for each, and probably ends up with a feature collection containing point-of-interest type features. Agree with your assessment above that this is the most common use case. In converting those types of features to points, I think the least surprising thing to do is to compute a centroid of the feature geometry instead of exploding them into multiple points. The workflow is something like this, right?
What doesn't exist yet is the utility that merges the best points of interest from every address query into one feature collection. Do we want to provide such glue for users? |
It's a bit funky but cat, jq and fio collect can already do that:
|
Your bash fu is strong, @perrygeo. |
So the current supported input options are:
|
Calling it good for now |
The directions, distance and surface APIs all require input waypoints. Let's specify this in more detail...
At the python SDK level, all of the services take an iterable/list of GeoJSON-like feature mappings. At the command line, it's not clear to me exactly what the inputs will be.
The CLI will take
x
and normalize it to a list of features wherex
could potentially be"[lat, lon]"
(ala the input to reverse geocoder)So the question is, What types of inputs will we support for waypoints? On one hand I want to support the most common workflows even if that means accepting a bunch of different input formats. On the other hand, unix design principles - let other tools do the lifting to get data into our expected format.
And on a related note, if we're accepting GeoJSON and the service requires points, how should we handle other geometry types? Automatically explode multipoints and lines to points? Skip them? Be strict? Most of these validation decisions will likely be implemented at the SDK level but it might be useful to discuss them in this context.
cc @sgillies
The text was updated successfully, but these errors were encountered: