Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- VillageName1, VillageName2
- Village1, Village2
- Village1, Village3
- Village1, Village4
- ...
- Village2379, Village2378
- sea <- readOGR('World_EEZ_v8_2014.shp')
- ocean_indo_shapefile <- sea[sea$Country == "Indonesia", ]
- #this function creates the points from Village1 to Village2 in 100m intevals, output is a dataframe
- points <- create_coordinates(village1_lat, village1_long, village2_lat, village2_long, 0.1)
- coordinates(points) <- ~ Longitude + Latitude
- proj4string(points) <- proj4string(ocean_indo_shapefile)
- #the calculation below is slow
- water_in_meter <- length(points[ocean_indo_shapefile,])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement