This is a follow up on my post that I wrote this weekend: “SQLGeography in SQL Server 2012 – Polygon must start on correct position?“, you probably want to go and skim it through and then come back. But basically after my first tests I got the feeling that the starting position was the issue, but it turns out it’s not. It’s the “left hand rule”. Let my try and explain with two pictures.


If you draw the polygon walking “clockwise” and imagine your self looking to the left. Then you are looking away from the shape being constructed, hence we will get the area outside of the shape.

If you instead walk counter-clockwise, you will be looking into the shape, hence we will get the polygon we desired. At least for my use-case.




, , ,

Join the conversation! 3 Comments

  1. […] I’ve written a followup on this post, explaining the issue and the “left hand rule”. Again feel free to educate […]

  2. So any ideas how to detect if the polygon is drawn counter- or clock wise?

    • Hi,

      there’s a link to the first post in this series with T-SQL and C# code. Hope that helps,




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 33 other followers

%d bloggers like this: