{
# Create a regular grid of test points
nodes = get.nodes(ocean.demo.grid)
lattice.grid = expand.grid(x=seq(min(nodes$x), max(nodes$x), len=25),
y=seq(min(nodes$y), max(nodes$y), len=25))
# Check which points are in the grid
in.grid = is.in.grid(ocean.demo.grid, lattice.grid, units="m")
# Plot the points that are in the grid
with(lattice.grid[in.grid,], plot(x, y))
}
Run the code above in your browser using DataLab