7 ms·
Geocode-sqlite: Geocode rows in an SQLite database table
- atatatat 5y agoMost egregious example of an editorialized title I've ever seen on HN, ha. You don't actually pronounce it "ESS-CUE-ELL ITE", do you?!
- wodenokoto 5y agoNot to be confused with spatial lite which trended on the front page earlier this year: https://www.gaia-gis.it/fossil/libspatialite/index https://www.gaia-gis.it/fossil/libspatialite/index
- teruakohatu 5y agoJust keep in mind while there is no API key required for OSM's Nominatum, there are no guarantees and they explicitly discourage bulk geocoding, with no clarification on what is bulk. [1] The lack of clarification seems intentional, which is understandable. geocode-sqlite does support non-OSM hosted instances of Nominatum so find an alternative if you have large or regular geocoding tasks. [1] https://operations.osmfoundation.org/policies/nominatim/ https://operations.osmfoundation.org/policies/nominatim/
- dawnerd 5y agoI've been trying to find a good self hosted docker version but just haven't had any luck. I have about 30k addresses I need to geocode and the paid solution are way out of budget.
- kvutza 5y agoThe example of Nominatum use at the geocode-sqlite page shows using a local, thus non-OSM hosted, instance of Nominatum. nominatum = Nominatum(user_agent="this-is-me", domain="nominatum.local.dev", scheme="http") I have not tried it myself, thus if it fails, could you please report on what goes wrong there?
- mtmail 5y ago> from geopy.geocoders import Nominatum It's called Nominatim, not Nominatum. If you run into issues then reporting it on github repository might be the best option. It's not clear if the HN user is the author of the library.
- Archelaos 5y agoI recently ran into the problem of how to efficiently filter a list of geo-locations based on a specific distance to a given geo-location. I could not find any discussion anywhere about possible algorithms. Does anyone have a recommendation (article, book, Web-site)?
- pezezin 5y agoIf you can use PostgreSQL, the obvious solution is PostGIS and the "geography" data type: https://postgis.net/ https://postgis.net/ https://postgis.net/docs/postgis_usage.html#PostGIS_Geography https://postgis.net/docs/postgis_usage.html#PostGIS_Geograph...
- mtmail 5y agohttps://gis.stackexchange.com/ https://gis.stackexchange.com/ and to a lesser extend https://help.openstreetmap.org/ https://help.openstreetmap.org/
- nl 5y agoThe generally correct answer is: PostGis. If approximate distances (with known error bounds that depend on lat/long) is appropriate then string prefix matching on GeoHash[1] is easy and quite beautiful in many ways. Basically locations within the same X character string code will be within a known lat/long square of each other. The longer the string the smaller the lat/long square. [1] https://www.movable-type.co.uk/scripts/geohash.html https://www.movable-type.co.uk/scripts/geohash.html, https://en.wikipedia.org/wiki/Geohash https://en.wikipedia.org/wiki/Geohash
- simonw 5y agoThe SpatiaLite extension for SQLite has a KNN implementation that is designed to handle this problem. Here are some notes I made on how to use it: https://til.simonwillison.net/spatialite/knn https://til.simonwillison.net/spatialite/knn
- DonnyV 5y agoYou can use the NetTopologySuite for C# or Java. Use buffer function. https://github.com/NetTopologySuite/NetTopologySuite https://github.com/NetTopologySuite/NetTopologySuite
- rubyfan 5y agoThe name is misleading to me. The name implies you can geocode from sqlite querying but this is basically a python package that uses sqlite as the data store for locations to be geocoded and where the results are stored.