Skip to content

loadingspace/geo-cluster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Geo Cluster

geo point cluster. use dbscan(Density-Based Spatial Clustering of Applications with Noise)

test

this is test param and result

param:
[{ "lat":40.263855, "lon":116.625509}, { "lat":40.277043, "lon":116.652108}, { "lat":40.266317, "lon":116.631658}, { "lat":40.277169, "lon":116.651286}, { "lat":40.276841, "lon":116.650922}, { "lat":37.574134, "lon":118.552578}, { "lat":40.27812, "lon":116.649567}, { "lat":40.276552, "lon":116.650055}, { "lat":40.276616, "lon":116.650054}, { "lat":40.263698, "lon":116.62527}, { "lat":40.276609, "lon":116.649974}, { "lat":38.526571, "lon":114.977288}, { "lat":38.522857, "lon":114.975468}, { "lat":41.221535, "lon":123.060864}, { "lat":38.522738, "lon":114.975672}, { "lat":34.840778, "lon":111.210388}, { "lat":38.513323, "lon":114.955268}, { "lat":35.728333, "lon":115.250091}, { "lat":38.522506, "lon":114.976507}, { "lat":34.855482, "lon":118.024524}, { "lat":38.522753, "lon":114.975738}, { "lat":38.522607, "lon":114.976167}, { "lat":38.522788, "lon":114.975825}, { "lat":38.523417, "lon":114.973947}, { "lat":35.040168, "lon":109.485067}]

result:
[[{ "lat":40.263855, "lon":116.625509}, { "lat":40.276552, "lon":116.650055}, { "lat":40.266317, "lon":116.631658}, { "lat":40.276841, "lon":116.650922}, { "lat":40.27812, "lon":116.649567}, { "lat":40.277043, "lon":116.652108}, { "lat":40.277169, "lon":116.651286}, { "lat":40.276609, "lon":116.649974}, { "lat":40.263698, "lon":116.62527}, { "lat":40.276616, "lon":116.650054}], [{ "lat":37.574134, "lon":118.552578}], [{ "lat":38.523417, "lon":114.973947}, { "lat":38.522857, "lon":114.975468}, { "lat":38.522607, "lon":114.976167}, { "lat":38.522506, "lon":114.976507}, { "lat":38.522738, "lon":114.975672}, { "lat":38.526571, "lon":114.977288}, { "lat":38.522788, "lon":114.975825}, { "lat":38.522753, "lon":114.975738}, { "lat":38.513323, "lon":114.955268}], [{ "lat":41.221535, "lon":123.060864}], [{ "lat":34.840778, "lon":111.210388}], [{ "lat":35.728333, "lon":115.250091}], [{ "lat":34.855482, "lon":118.024524}], [{ "lat":35.040168, "lon":109.485067}]]

quick start

List<List<GeoPoint>> cluster = GeoCluster.dbscan(List<GeoPoint> points, double eps, int minPts);
    
points : your geo points list
    
eps : dbscan eps

minPts : dbscan minPts

About

基于dbscan算法的geo聚集demo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages