You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of getting a featurecollection with the first 5 results, many use cases at the command line will require selecting a single result, usually the first feature.
I've been using this pattern to get a GeoJSON Feature
mapbox geocoding "place" | jq -c .features[0]
Useful for geocoding multiple places and making a GeoJSON FeatureCollection
Instead of getting a featurecollection with the first 5 results, many use cases at the command line will require selecting a single result, usually the first feature.
I've been using this pattern to get a GeoJSON Feature
Useful for geocoding multiple places and making a GeoJSON FeatureCollection
But
jq
isn't installed everywhere (it should be, it's awesome) and the arguments are not immediately clear.Proposal
A
--first-feature
option to output the first, highest-ranked Feature (without line-breaks to facilitate streaming) rather than a FeatureCollection.The parallel geocoding of multiple addresses becomes a little cleaner:
The only reason I'd hesitate to implement this would be our design principles #10:
So, does
--first-feature
make sense? Or do we just rely onjq
?The text was updated successfully, but these errors were encountered: