I have a grid point shapefile. I want to select N number of samples from those set of grid points. I tried pd.DataFrame.sample() but as we know it selects samples randomly. Is there any way I can select samples across those grid points uniformly?
I am using geopandas to read the shapefile. Below is pictorial representation of the task.(Not necessarily 1 step skip, it can be any but it should be uniform)
Edit: I need to select points such that deviation of distance between selected points is minimum to get a proper representation of whole area.
Below is a example I want to sample ~40 points.
Total Grid points:
Bad Sampling:
Good Sampling:
if counter % 2 == 0:
?? edit: I guess it wouldn't work really well if you have an odd number of columns or rows because there would be a shift every other row / columnscipy.spatial.distance.cityblock()
orscipy.spatial.distance.euclidean()