first implementation of iterative greedy algorithm to detect regular trips
This commit is contained in:
@@ -61,7 +61,7 @@ public class H3Service {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all cells within k distance of the given cell (including the cell itself).
|
||||
* Get all cells within k distance of the given cell (excluding the cell it self).
|
||||
* K-ring distance means cells reachable in k steps on the hexagonal grid.
|
||||
*
|
||||
* @param cellId H3 cell ID as hex string
|
||||
@@ -69,11 +69,12 @@ public class H3Service {
|
||||
* @return List of H3 cell IDs including the origin cell
|
||||
*/
|
||||
public List<String> getKRingNeighbors(String cellId, int k) {
|
||||
return h3.gridDisk(cellId, k);
|
||||
return h3.gridRing(cellId, k);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get K-ring neighbors using the configured route pattern resolution distance.
|
||||
* Ring means the center cell is not included.
|
||||
* Useful for finding nearby locations when matching trip patterns.
|
||||
*
|
||||
* @param cellId H3 cell ID as hex string
|
||||
|
||||
Reference in New Issue
Block a user