nasa / python_cmr

Python library for querying the common metadata repository.
MIT License
24 stars 22 forks source link

Feature: Check for correct WKT coordinate ordering #66

Open scottstanie opened 4 months ago

scottstanie commented 4 months ago

I was using earthaccess to search for some data, and I noticed that when I accidentally flipped the left/right coordinates in the bounding box, instead of an error being raised, it formed a polygon stretching the ~179 degrees around the Earth in the other direction.

The asf_search library raises a warning (and also repairs the winding direction) of your WKT when this happens, which is how I caught the mistake. Perhaps raising a warning that you may be entering the wrong coordinates during a search could be helpful?