How to create SqlGeography from polygon?


hi everyone, want create sqlgeography polygon, don't know how input points of polygon sqlgeography. me solve this? lot.

basically start new sqlgeographybuilder, set srid, begin polygon, add polygon lines, end figure, end geography.  have watch 1 thing though: if polygon in wrong direction you'll end polygon covers whole surface of earth except little region wanted.  can counter checking area of polygon and, if it's huge, rebuild polygon in reverse order.

the geo builder class docs can found here:  http://msdn.microsoft.com/query/dev11.query?appid=dev11idef1&l=en-us&k=k(microsoft.sqlserver.types.sqlgeographybuilder)%3bk(targetframeworkmoniker-.netframework%2cversion%3dv4.5)%3bk(devlang-vb)&rd=true



Bing Maps  >  Bing Maps WPF, WP7/8/8.1, Silverlight



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

How to fix error Msg 1801, Level 16, State 3, Line 1

How to Share webservice object to all user