Skip to content

distance squared is not necessary!? #3

Description

@mueller-fr

I think the closest distance to the next grid point can be obtained by looking at the lat and lon value seperately.

For finding the closest grid coordinate

look at lat and lon seperately

For the index

numpy's searchsorted() may be helpful since the values are sorted. It would work for getting the index of a grid point for each coordinate (lat and lon).

    index_lat = lats.searchsorted(grid_lat)
    index_lon = lons.searchsorted(grid_lon)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions