Map of Birds Eye Coverage in EMEA & APAC (Part 2)

Johannes Kebeck's Blog
09-15-2007, 03:25 PM
<p><strong>Step 1: Preparing the data</strong> <p>To accomplish these tasks I used SQL Server 2008 (Codename 'Katmai') which will be available in a public CTP very soon. SQL Server 2008 provides a number of <a href="http://www.opengeospatial.org/">OGC</a>-compliant spatial data-types, indexes and functions*- so far I discovered 76 functions. First of all I had to get the data into SQL Server 2008. Well the downside of new or not even released products is that there are not so many tools for it available so I started to write my own ETL-tool but then I got lucky again and <a href="http://www.safe.com/">Safe</a> provided me with a beta-version of their FME. FME is a powerful spatial ETL (Extract, Transform and Load) platform that enables organizations to seamlessly extract, translate, transform, integrate and distribute spatial data in over 200 GIS, CAD, raster and database formats.*The beta version I learned to love has already a connector for SQL Server 2008 and it loaded the data in the blink of an eye. <p><a href="http://blufiles.storage.msn.com/y1pLfDzppuxasjbGxeJXOrTnhfqxteQHx4U56Oztyhd_IZKcln uGYPNsxvndWImiYv3MU5W7PpKZzc"><img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=306 alt=image src="http://blufiles.storage.msn.com/y1pLfDzppuxasi5turCH8QzbXh6HcgoydYLvNgmp4TEspkvTMM xZED5wCMIVIkJ8sdOZRGstoGL0tw" width=400 border=0></a> <p>Now that I have the data in SQL Server 2008 I start with some preliminary checks. The OGC Simple Feature Specification does not allow self intersecting polygons like shown below: <p><a href="http://blufiles.storage.msn.com/y1pLfDzppuxasjkA6jmMSyQeZx0CHdZa8nqyZBrIxMP4-J-QEmJPR-pTkQZVquNH7Yeblc1Bpz0al4"><img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=263 alt=image src="http://blufiles.storage.msn.com/y1pLfDzppuxasjgVwev6TLL-8aQ8KJaZ3Cl4uxt_vq6U16RtU4JytfJRXXttMie_bOM2XrQHAI 7-4E" width=400 border=0></a> <p>Fortunately SQL Server 2008 can already help you out:<pre><span style="color:rgb(128,128,128)">UPDATE</span> FromBlom <span style="color:rgb(0,0,255)">SET</span> Shape <span style="color:rgb(128,128,128)">=</span>
<span style="color:rgb(128,128,128)">(</span><span style="color:rgb(0,0,255)">SELECT</span> Shape<span style="color:rgb(128,128,128)">.</span>MakeValid<span style="color:rgb(128,128,128)">()</span>
<span style="color:rgb(0,0,255)">FROM</span> FromBlom
<span style="color:rgb(0,0,255)">WHERE</span> ID<span style="color:rgb(128,128,128)">=</span>24<span style="color:rgb(128,128,128)">)
</span> <span style="color:rgb(0,0,255)">WHERE</span> ID<span style="color:rgb(128,128,128)">=</span>24
</pre><a href="http://11011.net/software/vspaste"></a>
<p>The resulting shape is valid and clean
<p><a href="http://blufiles.storage.msn.com/y1pLfDzppuxasiFyjynMNYv313gnspojuQwESmcSqEXU4IUfa8 h3nl9v4ikbM2xCPbJIZPXwL49cRY"><img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=292 alt=image src="http://blufiles.storage.msn.com/y1pLfDzppuxasiDYeqMnx2GW5YiEQYHpak54ObAcXefokq3cD1 mH2t21lmPveKbRE_HbvCBmov1av8" width=400 border=0></a><img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=4819404664324524694&page=RSS%3a+Map+of+Birds+Eye+Coverage+in+EMEA+%26+ APAC+(Part+2)&referrer=" width="1px" height="1px" border="0" alt=""><img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&NA=1149&PI=88469&RF=&DI=3919&PS=85545&TP=johanneskebeck.spaces.live.com&GT1=JohannesKebeck">

Click here to view the article. (http://JohannesKebeck.spaces.live.com/Blog/cns!42E1F70205EC8A96!1727.entry)

 
Web mp2kmag.com
mapforums.com