Skip to content

Other Features in RegionGrids.jl?

Below are some other features that are available in RegionGrids.jl. This list may expand over time.

Nearest n Points in RegionGrids.jl

RegionGrids.nearest Function
julia
nearest(
    pnt  :: Point2,
    ggrd :: RegionGrid;
    n    :: Int = 1
) -> Union{Int, Array{Int}}

Finds the nearest n grid points to the given point pnt in a given RegionGrid ggrd. If n is 1, it returns the index of the nearest grid point. Otherwise, it returns an array of indices for the n nearest grid points.

Arguments

  • pnt : A Point2 representing the location for which to find nearest grid points.

  • ggrd : A RegionGrid containing detailed information on the grid.

  • n : An integer specifying the number of nearest grid points to find.

source
julia
nearest(
    fgrd :: RegionGrid,
    cgrd :: RegionGrid
) -> Array{Int}

For each point on a high-resolution RegionGrid fgrd, find the index of the closest grid-point on a lower-resolution RegionGrid cgrd.

Arguments

  • fgrd : A RegionGrid containing the high-resolution grid points.

  • cgrd : A RegionGrid containing the lower-resolution grid points.

source