NOAA-ORR-ERD / LibGOODS

Library for accessing data useful for the NOAA / GNOME model
https://libgoods.readthedocs.io/en/latest/
Other
1 stars 2 forks source link

Representing Bounding boxes #30

Open ChrisBarker-NOAA opened 1 year ago

ChrisBarker-NOAA commented 1 year ago

There are a number of (similar) ways to represent grid-aligned bounding boxes. For instance, in extract model, I see:

        bbox : Tuple of four floats
            The axis-aligned bounding box containing (xmin, ymin, xmax, ymax).

and in libgoods, I think we are using two points: (lower_left, upper_right), e.g.:

((min_lon, max_lon),(max_lon, max_lat))

I have a minor preference for the two points version, but either is fine -- but it would be good to be consistent across the project.

@lukecampbell, @kthyng, @jay-hennen, @AmyMacFadyen:

preferences?

ChrisBarker-NOAA commented 1 year ago

Note, there is also some code in libgoods.utilities for working with these.

ChrisBarker-NOAA commented 1 year ago

BTW: one thing I like about the two points version is that it is consistent with representation of polygons as a sequence of points (or (N,2) numpy array).