Coder Social home page Coder Social logo

geohash-example's Introduction

Server-side Clustering of Geo Points Using Geohash Example

When there are a lot of geo objects on map they are barely distinguishable and merged into one big spot. A lot of memory is used to store geo object coordinates and other data. Displaying map with many points consumes a lot of hardware resources so applications frequently hang.

Standard solution to this problem is to union objects located nearby into group called cluster with special icon where the number of elements in cluster is specified. When zoomed cluster is splitted into separate points or other clusters.

This example shows how to implement server-side clustering of geo points on a map using Geohash.

To get more details read about Geohash encoding and decoding algorithm and server-side clustering of geo points using Geohash.

Build

mvn clean package -Pdocker

Run

docker-compose up -d

Use

http://localhost:8000
curl -X GET --header 'Accept: application/json' 'http://localhost:8080/api/geo-cluster?south_west_lat=33.797408767572485&south_west_lon=-19.51171875&north_east_lat=62.14497603754045&north_east_lon=59.58984374999999&zoom=4'
curl -X POST --header 'Content-Type: application/x-www-form-urlencoded' --header 'Accept: application/json' -d 'lat=50.4546600&lon=30.5238000&country_code=UA' 'http://localhost:8080/api/geo-point'

Swagger

http://localhost:8080/swagger.json
http://localhost:8080/swagger-ui

geohash-example's People

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.