dimanche 9 juin 2019

Randomly create n lat-long boxes from main source

Let's suppose I have the following latitude and longitude global coordinates of a given variable:

lat = seq(-90, 90, by = 0.5)
long = seq(0, 359, by = 0.5) 

How can I randomly create let's say 10 lat-long squared boxes of size 10x10?

e.g.

> box_1
      lat_1 long_1
 [1,] -90.0    0.0
 [2,] -89.5    0.5
 [3,] -89.0    1.0
 [4,] -88.5    1.5
 [5,] -88.0    2.0
 [6,] -87.5    2.5
 [7,] -87.0    3.0
 [8,] -86.5    3.5
 [9,] -86.0    4.0
[10,] -85.5    4.5

etc...

Thanks




Aucun commentaire:

Enregistrer un commentaire