In PostGIS, I would expect ST_Geography
polygons to use a clockwise winding rule, i.e. everything to the right of the edges of the polygon is inside of the polygon.
Therefore, I expected a polygon going over the equator to the west to encompass the entire northern hemisphere, and a polygon going over the equator to the east to encompass the southern hemisphere.
This is not the case, though:
select st_covers(st_geogfromtext('polygon((0 0, -90 0, -180 0, 90 0, 0 0))'),
st_geogfromtext('point(0 -5)'))
returns true
, so the polygon going to the west contains a point on the southern hemisphere.
In fact, if I change the direction of the polygon to go to the east, it also contains points on the southern hemisphere, and I can't figure out how to make a polygon that contains points on the northern hemisphere.
So where is my misunderstanding, and how do I create a polygon that contains points on the northern hemisphere?