Skip to content

Latest commit

 

History

History
11 lines (9 loc) · 537 Bytes

README.md

File metadata and controls

11 lines (9 loc) · 537 Bytes

Use this function, specify your district and lat lng ->

cities.geojson is a file with all districts and their multipolygon ( ref -> https://www.kaggle.com/datasets/adityaradha007/indian-districts-geojson?resource=download )

public static void main(String[] args) {
    CityChecker cityChecker = new CityChecker("cities.geojson"); //refer according to your path
    boolean isWithinCity = cityChecker.isCoordinateInCity("Bangalore", 12.9716, 77.5946);
    System.out.println("Coordinate is within city: " + isWithinCity);
}