I have two datasets and the datasets having longitude and latitude values.
let us say :
- point_x1 is (lang_1, latt_1)
- point_x2 is (lang_2, latt_2)
- the first dataset has "n" rows of data with
point_x1, x1
- the second dataset has "m" rows of data with
point_x2, x2
where m > n
Edit: Note: m
will be 20000 or more, and n
will be 5000 or more.
I want to group or merge both datasets.
I want to find for each point_x2 nearest point_x1
and then
would like to create a new data with point_x2, x2, x1
(where point_x1 is nearest to point_x2) for each line in dataset2.
dataset1-sample:
-91.850532 40.376043 x1_a1
-91.850519 40.376043 x1_a2
-91.850504 40.376043 x1_a3
-91.850487 40.376043 x1_a4
-91.850399 40.376044 x1_a5
-91.850353 40.376044 x1_a6
dataset2-sample:
-91.848442 40.380573 x2_a0
-91.850292 40.378533 x2_a1
-91.849919 40.377883 x2_a2
-91.849109 40.385833 x2_a3
-91.845884 40.381623 x2_a4
-91.847344 40.376693 x2_a5
-91.846937 40.382653 x2_a6
-91.849827 40.381343 x2_a7
-91.850149 40.383474 x2_a8
-91.848569 40.384904 x2_a9
-91.849063 40.377384 x2_a10
-91.845563 40.378604 x2_a11
I have no much idea of data science or geo analysis. Looking for help on approach.
Please suggest me how to do that.