geohash-example icon indicating copy to clipboard operation
geohash-example copied to clipboard

The example of server-side geo clustering using relational database (SQL) and geohash index

Rents Map - Geohash Example

The example demonstrates server-side geo clustering using relational database (SQL) and geohash index.

The example visualizes on a map apartment rental offers grouping offers located near one another together and representing them using colored circle of variable size. The larger the size, the more offers are available in the area. Color represents a price. Green - low price, yellow - average price, red - high price. When you hover over the circle, detailed information on the number of offers and the price is displayed.

As you zoom in, the clusters are divided into smaller ones. At the maximum zoom level, circles represent individual offers.

Rents Map Geohash Example Demo

How is it implemented?

Read about the implementation in the article on SlideShare.

The article on SlideShare

Building

Before You Start

To build you will need Git and JDK 11 or later.

Get the Source Code

git clone [email protected]:evgeniy-khist/geohash-example.git
cd geohash-example

Build from the Command Line

This project uses a Gradle build. The instructions below use Gradle Wrapper from the root of the source tree. The wrapper script serves as a cross-platform, self-contained bootstrap mechanism for the build system.

To compile, test and build JAR use:

./gradlew clean build -i

Running Locally

To run the project locally use:

./gradlew clean bootRun

Open URL http://localhost:8080/geohash-example/ in a browser.

Contributing

This project follows Google Java Style Guide.

You may also be interested to import intellij-java-google-style.xml IntelliJ IDEA code style XML.

License

The Geohash Example is released under version 2.0 of the Apache License.