Comments (5)
Seems to me that we've got to support at least these two inputs:
- streams of coordinate pairs (either as JSON or comma-delimited pairs), the most abstract input
- geocoding output, the least abstract input
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?
Geocoding stuff --> FeatureCollection --> list of [x, y] centers --> API
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?
from mapbox-cli-py.
utility that merges the best points of interest from every address query into one feature collection
It's a bit funky but cat, jq and fio collect can already do that:
cat <(x-mapbox geocoding "Portland, OR" | jq -c .features[0]) \
<(x-mapbox geocoding "Bend, OR" | jq -c .features[0]) \
<(x-mapbox geocoding "Corvallis, OR" | jq -c .features[0]) \
| fio collect > points_featurecollection.geojson
from mapbox-cli-py.
Your bash fu is strong, @perrygeo.
from mapbox-cli-py.
So the current supported input options are:
- Coordinate pair(s) of the form
[0, 0]
or0,0
or0 0
- An input stream/file(s) containing either a GeoJSON Feature or FeatureCollection.
- For functions that accept points only, any non-point feature is silently filtered out.
from mapbox-cli-py.
Calling it good for now
from mapbox-cli-py.
Related Issues (20)
- Seems to be an off-by-one error in mapbox staticimage HOT 4
- Tileset info incorrect when uploading data files in parallel HOT 2
- Update Directions CLI HOT 5
- python MapboxDeprecationWarning: The distance module will be removed in the next version. Use the matrix module instead. "Use the matrix module instead.", MapboxDeprecationWarning) HOT 3
- Add mapbox-matrix HOT 2
- Homebrew tap: error & fix HOT 1
- 0.8.0 release
- address Homebrew formula warning HOT 1
- TypeError: request() got an unexpected keyword argument 'json'
- Remove deprecated Distance API
- Remove surface command HOT 1
- Gracefully error when tileset name not specified HOT 2
- Usage of `datasets create-tileset` HOT 1
- Retreiving tilesets HOT 1
- pip install --user mapboxcli doesn't actually install properly on debian 10 (buster) HOT 1
- Update mapbox dependency to support Python 3.9
- error while installing using homebrew HOT 9
- Install Fails on Windows
- Latest version on pypi is no longer installing properly
- Is this project abandoned?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mapbox-cli-py.