geolite
making openstreetmap data usable by anyone: from .osm.pbf to the first query answer.
open source geocode
getting started
with cargo
with docker
# command line
# pre-built countries geocodes
# open http://localhost:8080
docs
docker images
base image
pre-built images
size matters: once a country's data grows too large for a docker image, its pre-built image stops being updated and may be dropped.
# open http://localhost:8080
available country list
| # | country | docker cmd |
|---|---|---|
| 1 | brazil | docker run -p 8080:8080 pjpimentel/geolite:prebuilt-brazil |
| 2 | portugal | docker run -p 8080:8080 pjpimentel/geolite:prebuilt-portugal |
| 3 | argentina | docker run -p 8080:8080 pjpimentel/geolite:prebuilt-argentina |
| 4 | bolivia | docker run -p 8080:8080 pjpimentel/geolite:prebuilt-bolivia |
| 5 | chile | docker run -p 8080:8080 pjpimentel/geolite:prebuilt-chile |
| 6 | colombia | docker run -p 8080:8080 pjpimentel/geolite:prebuilt-colombia |
| 7 | ecuador | docker run -p 8080:8080 pjpimentel/geolite:prebuilt-ecuador |
| 8 | guyana | docker run -p 8080:8080 pjpimentel/geolite:prebuilt-guyana |
| 9 | paraguay | docker run -p 8080:8080 pjpimentel/geolite:prebuilt-paraguay |
| 10 | peru | docker run -p 8080:8080 pjpimentel/geolite:prebuilt-peru |
| 11 | suriname | docker run -p 8080:8080 pjpimentel/geolite:prebuilt-suriname |
| 12 | uruguay | docker run -p 8080:8080 pjpimentel/geolite:prebuilt-uruguay |
| 13 | venezuela | docker run -p 8080:8080 pjpimentel/geolite:prebuilt-venezuela |
| 14 | netherlands | docker run -p 8080:8080 pjpimentel/geolite:prebuilt-netherlands |
| 15 | switzerland | docker run -p 8080:8080 pjpimentel/geolite:prebuilt-switzerland |
cookbook
execute all necessary steps
# or with docker
extract each data from a pbf file
index extracted data
optimize data
query
explore
merge separately-built databases
# machine 1
# machine 2
# merge all builds into a new combined database (created fresh)
# or with docker
run the end-to-end suite
question and answers
a) why geolite?
"geo" comes from "geocode" and "lite" comes from "sqlite", no special meaning.
b) where does the data come from?
the data comes from any .osm.pbf file (openstreetmap's protobuffer format). this project uses geofabrik as the initial source, which extracts its data from openstreetmap.
c) which license applies?
the source code is under agplv3 and its dependencies keep their own (all permissive: mit, apache-2.0, bsd, zlib, isc). databases built from openstreetmap data — including the ones shipped in the prebuilt-* images — are derivative databases under the odbl, filtered and restructured for geocoding: © openstreetmap contributors.
d) why build another geocoder?
two reasons, in this order: to practice rust on a problem large enough to be interesting, and because the alternatives i tried were a bit too complex for a quick run.