Yeap, just did that and it seems like each start and end point coincide for an enclosed polyline, which makes sense... In that case, each rectangle returns a list of 5 points where indexes 0 and 4 represent the same point. I did a quick tweak and it worked! Of course this is just for the ideal case of fully enclosed polylines without any 'parasitic' points. For now, it works as a proof of concept, but I will still have to include the additional tests you mentioned in order to make the method bulletproof. Thanks!
↧