Skip to content

An fast geocoding java library for calculate the distance between two points

License

Notifications You must be signed in to change notification settings

cgenin/geocoding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

geocoding

An java api for sorting object by an reference point. This library was created to be fast otherwise the results has lost in precision.

This api can manage french department.

Usage

Create an Point

Point pt = Point.builder()
                    .lat(lattitude)
                    .lon(longitude)
                    .build(); 

The point is the base objet of this framework. This object can must contain lattitude, longtude and maybe an Object.

Calculate the distance between to points


Sorting object by distance between the data and an reference point

List<Datas> list =  new ArrayList();
list.add(data1);
list.add(data2);
...

Datas MyreferencePoint = ...

List<Datas> sortinglist = Distances.sorter(MyreferencePoint.getLatitude(), MyreferencePoint.getLongitude())
    .sort(list, d -> Point.builder(d)
                .lon(d.getLongitude())
                .lat(d.getLatitude())
                .build());

License

MIT

About

An fast geocoding java library for calculate the distance between two points

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages