The STAREDataFrame constructor does not give us the full ability to configure the creation of the sids. Default values are used instead. I.e. convex=False and force_ccw=True.
convex=False means we are computing the SIDs for the actual exterior ring, not for it's convex hull
force_ccw=True ensures that the exterior ring is counterclockwise and the interior rings clockwise. Unfortunately, this is a bit of a clusterfuck. We use the OGC definition. I.e. we need exterior rings to be CCW.
The polygon we defined is clockwise. The STAREDataFrame constructor by default reverses the order to make it ccw making the ring the outer bound. in our make_sids call, we do not force ccw, making the ring the inner bound. I.e. the SIDs correspond to trixels covering everything on earth except the polygon.
How does use_convex and force_ccw work?
Let's
Now let's check the number of sids
(352,)
(628,)
Why do these yield different results?
The STAREDataFrame constructor does not give us the full ability to configure the creation of the sids. Default values are used instead. I.e.
convex=False
andforce_ccw=True
.convex=False
means we are computing the SIDs for the actual exterior ring, not for it's convex hullforce_ccw=True
ensures that the exterior ring is counterclockwise and the interior rings clockwise. Unfortunately, this is a bit of a clusterfuck. We use the OGC definition. I.e. we need exterior rings to be CCW.The polygon we defined is clockwise. The STAREDataFrame constructor by default reverses the order to make it ccw making the ring the outer bound. in our
make_sids
call, we do not force ccw, making the ring the inner bound. I.e. the SIDs correspond to trixels covering everything on earth except the polygon.False