On Tue, Feb 18, 2025 at 11:06 AM Dan Patterson <dan_patter...@outlook.com>
wrote:

> I tend to work with Nx2 arrays representing coordinate geometry.
> I have examined a number of packages and there is no guidelines as to why
> a certain arrangement is preferred over the other.
> For example:  a rectangle, coordinates ordered clockwise with the first
> and last the same to ensure closure of the geometry
>

That's the great thing about conventions; there are so many to choose from!
/sarcasm

Usually, there is nothing substantial that would cause one to strongly
prefer one convention over another. I usually take a look at existing
libraries that I might want to use and pick a convention that makes it easy
to use those libraries. So for use cases like this, I might want to use
Shapely for some robust geometrical operations, so I'd follow Shapely
conventions. But if I'm just drawing polygons onto images, I might follow
scikit-image's convention instead.

By and large, you can usually safely follow whatever is your personal
preference without fearing that you are missing out on something vital.
What makes these conventions are the low stakes.

-- 
Robert Kern
_______________________________________________
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: arch...@mail-archive.com

Reply via email to