mllam / weather-model-graphs

Tooling for creating, visualising and storing data-driven weather-model graphs
https://join.slack.com/t/ml-lam/
6 stars 8 forks source link

Distance-Based Indexing of Boundary Dataset Points #30

Open TomasLandelius opened 1 week ago

TomasLandelius commented 1 week ago

Add functionality that processes latitude and longitude information from two source datasets (no need for reference to projections or regular grids): LAM and boundary. This functionality should:

  1. Take lat-lon data from both LAM and boundary datasets.
  2. Accept a specified distance parameter.
  3. Return an index to the boundary dataset points that are within the specified distance from the LAM border.
  4. Optionally include boundary points that are inside the LAM area.

The set up based only on a list of lat-lon coordinates and corresponding indexing will work nicely with #29.

My idea is to use the SphericalPolygon.convex_hull functionality from the spherical_geometry library package to achieve this (see example below). lam_inside+bnd_bnd_outside_d_glb

joeloskarsson commented 1 week ago

Should this go in here or in https://github.com/mllam/mllam-data-prep ?

(But I agree, #29 will be neccesary to make the graph creation work for these kinds of grid layouts.)