I'm creating a hyper local delivery service app . I can only receive order if there is a store within 5 km radius from the user . I stored the store locations in geojson format . Is there a function in h3-js which will take radius , array of stores , h3 index and then give back the list of stores which are within 5 km range from the given h3 index . or how can i implement this using h3-js?
How to find the locations (indices whose lat long co-ordinates are stored in geo-json format) within 5 Km radius of a h3 index in h3-js?
2.2k Views Asked by Goutham Raj R At
1
There are 1 best solutions below
Related Questions in MAPS
- Accessing Google Maps Markers in 2D-array from outside
- How to easily create a heatmap layer from a pre-existing vector layer of points in OpenLayers 3?
- Android studio doesn't show google maps
- Google Maps Data URI Scheme Failing in Android's "HTML Viewer"
- Prevent plotting scaled point with zero value, Mapbox, leaflet
- How to embed a kml or kmz file in my webpage
- How can I center the GMSMapMarker view in a coordinate
- How do I use elements of a vector as arguments for another command in R?
- Qt5/QML Displaying a custom route on a map
- Optimize duplicate values in NoSql key-value storage
- Displaying bubbles in Kartograph.js
- android.support.v4.app.Fragment Google Map on API 10
- User selecting item in map
- jQuery/javascript Plugin for maps that will render borders or parks
- Cordova G.maps plugin build failed with not have OS required enviroment
Related Questions in UBER-API
- OAuth token not retrieved with Uber API
- Uber request error
- How do I get taxi location data from api's like uber and ola cabs?
- Change 1Password App extension navigation bar title color
- Localization of strings of Uber iOS SDK
- Is storing Surge information a breach of Uber's API Terms of Use?
- GET request endpoint results rider_id is null
- How to add currency to digital wallet through Uber APIs?
- I want to use Get /v1.2/products REST API of Uber in android
- Is it possible to request for multiple cabs using Uber API?
- Uber deeplink Android app
- Uber SSO Login error Swift 2.3
- What is "SURGE CONFIRMATION REDIRECT URI" in Uber SDK?
- Errors configuring UberRush javascript module
- Uber API for login page, option for Login using Facebook does not work?
Related Questions in H3
- H3 hexagons not matching
- uploading geoDataFrame as .shp in GEE : multipolygon grid crossing the antimeridian
- Converting an LineString to h3 hexagons using srai
- Given H3 cells from polyfill, how to identify cells which are fully contained, partially contained or contiguous with the polygon?
- PostgreSQL performance issues with aggregation
- Get resulting hex data from Hexagon layer in h3
- How to create H3 shapefiles in a particular area to use in Tableau
- Uber H3 geoToH3 is not working in React Native
- Better pentagon/hexagon area ratio
- Is there a way to find the geo coordinates of all the buildings in a city?
- Is corse parent == parent index?
- Can Uber h3 cover the entire globe in hexagonal grid?
- using h3 library with pyspark dataframe
- H3 - How to get center lat long of a multi polygon?
- Build failed - h3
Related Questions in S2
- TypeError: ljust() argument 2 must be char, not unicode
- Cloud Run - Requests latency
- Complex lambda with sqlalchemy filter query
- How would I use S2 in a Yelp or Uber service?
- How to fix spherical geometry errors caused by conversion from GEOS to s2
- How to perform the Search operation using Google S2 geometry
- Performing a location proximity search on a database using S2 Geometry Library
- Possible to find K closest points using S2 library (and is it effective)?
- How to find the locations (indices whose lat long co-ordinates are stored in geo-json format) within 5 Km radius of a h3 index in h3-js?
- How to resolve spherical geometry failures when joining spatial data
- In BigQuery, how can I find the S2_ID at level 16 corresponding to each (latitude, longitude)?
- S2-Cell-Draw, gaps in returned Polygons
- Google S2 Geometry: polygon contains check does not work as expected
- How to use geo/s2 library to determine a LatLong lies inside a radius from another LatLong in Go?
- How to aggregate real-time geolocation of user using S2 Geometry Library at different zoom levels?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
There are a few different parts here:
Pick a resolution: Pick an H3 resolution for lookup. Finer res means more accuracy but more memory usage. Res 8 is roughly a few city blocks in size.
Indexing Data: To use H3 for the radius lookup, you need to index the stores by H3 index. If you want this to be efficient, you'd be better off indexing all the stores ahead of time. How you do this is up to you; one easy way in JS might be to create a map of id arrays:
Perform the lookup: To search, index your search location and get all the H3 indexes within some radius. You can use the
h3.edgeLengthfunction to get the approximate radius of a cell at your current resolution.See a working example on Observable
Caveats: This is not a true radius search. The k-ring is a roughly hexagonal shape centered on the origin. This is good enough for many use cases, and much faster than a traditional Haversine radius search, especially if you have many rows to search over. But if you care about the exact distance H3 might not be appropriate (or, in some cases, H3 might be fine, but you might want the indexes inside a "true" circle - one option here is to convert your circle to a close-to-circular polygon, then get the indexes via
h3.polyfill).