Skip to content
/ geodata Public

API-driven fast and free geo-data server for flexible deployment. Comes with a pre-built Docker image.

Notifications You must be signed in to change notification settings

ethlo/geodata

Repository files navigation

Geodata

Docker Image Version (latest semver) Docker Image Size (latest by date) Docker Pulls Splash info page

Features

Simple, fast and free geo-data server for flexible deployment. This service is intended for doing quick lookups, like:

  • Searching for a location by name, ip, telephone number, lat/long coordinates
  • Query if a location is a child, grand-child, etc of another location
  • Browse location hierarchy (starting from continents and moving down administrative locations)

NOTE: This is not an advanced GIS tool for map manipulation and analysis.

Performance

Low memory overhead and super-fast response times utilizing appropriate fit-for-purpose data-structures, and a highly optimized HTTP handler built on UnderTow. Depending on hardware you can expect thousands to hundreds-of-thousands of requests per second.

Ease-of-use

For quick and easy distribution of data the system utilizes no database. Typical data imports are a few hundred mega bytes, and require no further processing or data-loading before running on a server.

Fully documented RESTful API

The API is fully documented using Open API 3.x specification and allows for easy consumption from numerous platforms. OpenAPI docs

Usage guide

Import and process data

Prerequisite: You need to register for an account at MaxMind (free) for the GeoLite2 data

Simple, sample script I use for creating data-set for the server:

docker run --memory=2G --rm --name geodata-server-import \
-v ~/geodata/data:/geodata-server/data \
-v ~/geodata/input:/geodata-server/input \
-v /tmp/geodata:/tmp/geodata \
-e "GEODATA_IMPORT=1" \
-e "GEODATA_MAXDATAAGE=P14D" \
-e "GEODATA_GEOLITE2_LICENSE_KEY=<<LICENSE>>" ethlocom/geodata-server

Start the server

Start the server and load the data from the import step. Listen on host port 6566.

docker run -d --rm -m1G -p 6566:6565 --name geodata-server -v ~/geodata/data:/geodata-server/data \
-e JAVA_OPTS="-XX:MaxDirectMemorySize=1G" ethlocom/geodata-server:latest \ 
&& docker logs -f geodata-server

This service utilize data from:

About

API-driven fast and free geo-data server for flexible deployment. Comes with a pre-built Docker image.

Topics

Resources

Stars

Watchers

Forks

Languages