Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I saw #2 and this is one of the few local geocoding libraries, so I had the need to implement a reverse geocoder based on it. I'm proposing a way to execute reverse geocoding from the
geo_data
variable insideGeocode
.Root idea is to fit a KDTree (imported from
scikit-learn
) on the longitudes and latitudes, so that a new latitude and longitude pair can be queried, in order to obtain the index of the nearest location.An example of use of the branch:
basically a class
ReverseGeocoder
is returned byGeocode
and that class holds the kdtree to query the nearest points.I don't know if the PR fits your idea of the project.
In case also the way in which it's implemented or the function names could be modified. Docs could be added to this PR if it makes sense.
Let me know if it is of interest for you!