{"id":119,"date":"2014-01-02T23:39:10","date_gmt":"2014-01-02T15:39:10","guid":{"rendered":"http:\/\/suherman.asia\/w2\/?p=119"},"modified":"2014-01-02T23:39:10","modified_gmt":"2014-01-02T15:39:10","slug":"spatial-datatypes-introduced-in-sql-server-2008","status":"publish","type":"post","link":"http:\/\/suherman.asia\/w2\/spatial-datatypes-introduced-in-sql-server-2008.html","title":{"rendered":"Spatial Datatypes Introduced in SQL Server 2008"},"content":{"rendered":"<p align=\"justify\">Microsoft SQL Server 2008 memiliki 2 buah type data baru yang dibuat khusus untuk menyimpan spatial data. Tipe data tersebut adalah Geography dan Geometry.<\/p>\n<p align=\"justify\">Tipe data Geography digunakan untuk menyimpan spatial data jenis Vektor Geodetic sedangkan Geometry digunakan untuk menyimpan spatial data jenis Vektor Planar.<\/p>\n<p>Untuk mengetahui Geodetic spatial reference systems yang disupport oleh SQL Server 2008 dapat dilakukan dengan melihat data yang tersimpan di tabel sys.spatial_reference_systems. Lakukan dengan T-SQL seperti ini :<\/p>\n<div id=\"codeSnippetWrapper\" style=\"text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; border: silver 1px solid; padding: 4px;\">\n<div id=\"codeSnippet\" style=\"text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;\">\n<pre style=\"text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;\"><span style=\"color: #0000ff;\">select<\/span> * <span style=\"color: #0000ff;\">from<\/span> sys.spatial_reference_systems<\/pre>\n<p><!--CRLF--><\/p>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<p>Disana tersimpan juga informasi detail dari spatial reference menggunakan format Well-Known Text (WKT). WKT adalah standar industri untuk engekspresikan informasi spatial yang telah diakui oleh <a href=\"http:\/\/www.opengeospatial.org\/\" target=\"_blank\">OGC<\/a> (<em>Open Geospatial Consortium<\/em>).<\/p>\n<p>Misalkan kita hendak melihat Geodetic spatial reference system yang biasa digunakan di sistem GPS, yaitu WGS 84. pada sys.spatial_reference_systems dapat kita temukan pada EPSG:4326 spatial reference. untuk dapat menemukannya, kita dapat melakukan query seperti ini :<\/p>\n<div id=\"codeSnippetWrapper\" style=\"text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; border: silver 1px solid; padding: 4px;\">\n<div id=\"codeSnippet\" style=\"text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;\">\n<pre style=\"text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;\"><span style=\"color: #0000ff;\">select<\/span> well_known_text <span style=\"color: #0000ff;\">from<\/span> sys.spatial_reference_systems<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;\"><span style=\"color: #0000ff;\">where<\/span> authority_name=<span style=\"color: #006080;\">'EPSG'<\/span><\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;\"><span style=\"color: #0000ff;\">and<\/span> authorized_spatial_reference_id=4326<\/pre>\n<p><!--CRLF--><\/p>\n<\/div>\n<\/div>\n<p>maka akan didapatkan data sebagai berikut :<\/p>\n<blockquote><p>GEOGCS[<\/p>\n<p>&#8220;WGS 84&#8221;,<\/p>\n<p>DATUM[&#8220;World Geodetic System 1984&#8221;,<\/p>\n<p>ELLIPSOID[<\/p>\n<p>&#8220;WGS 84&#8221;,<\/p>\n<p>6378137,<\/p>\n<p>298.257223563]],<\/p>\n<p>PRIMEM[<\/p>\n<p>&#8220;Greenwich&#8221;, 0],<\/p>\n<p>UNIT[&#8220;Degree&#8221;, 0.0174532925199433]]<\/p><\/blockquote>\n<p>dari data diatas dapat kita kenali bahwa Geographic Coordinate System yang digunakan adalah \u201cWGS 84\u201d. Geographic Coordinate System menunjukkan posisi dari object menggunakan angular coordinates yang biasa kita kenal juga dengan sebutan latitude dan longitude.<\/p>\n<p>Tipe data Geometry memperlakukan data spatial sebagai sebuah flat object, sehingga apabila kita melakukan perhitungan jarak antara 2 buah titik, dapat dilakukan dengan perhitungan geometrik biasa.<\/p>\n<style type=\"text\/css\"><\/style>\n<p>Setiap objek yang ada akan dikenali posisinya menggunakan sistem koordinat Cartesian (X,Y).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Microsoft SQL Server 2008 memiliki 2 buah type data baru yang dibuat khusus untuk menyimpan spatial data. Tipe data tersebut adalah Geography dan Geometry. Tipe data Geography digunakan untuk menyimpan spatial data jenis Vektor Geodetic sedangkan Geometry digunakan untuk menyimpan spatial data jenis Vektor Planar. Untuk mengetahui Geodetic spatial reference \u2026<\/p>\n<p class=\"continue-reading-button\"> <a class=\"continue-reading-link\" href=\"http:\/\/suherman.asia\/w2\/spatial-datatypes-introduced-in-sql-server-2008.html\">Continue reading<i class=\"crycon-right-dir\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":120,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[35],"class_list":["post-119","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-spatial","tag-datatype"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Spatial Datatypes Introduced in SQL Server 2008 - Suherman Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/suherman.asia\/w2\/spatial-datatypes-introduced-in-sql-server-2008.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spatial Datatypes Introduced in SQL Server 2008 - Suherman Blog\" \/>\n<meta property=\"og:description\" content=\"Microsoft SQL Server 2008 memiliki 2 buah type data baru yang dibuat khusus untuk menyimpan spatial data. Tipe data tersebut adalah Geography dan Geometry. Tipe data Geography digunakan untuk menyimpan spatial data jenis Vektor Geodetic sedangkan Geometry digunakan untuk menyimpan spatial data jenis Vektor Planar. Untuk mengetahui Geodetic spatial reference \u2026 Continue reading\" \/>\n<meta property=\"og:url\" content=\"http:\/\/suherman.asia\/w2\/spatial-datatypes-introduced-in-sql-server-2008.html\" \/>\n<meta property=\"og:site_name\" content=\"Suherman Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/emantin34\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/emantin34\" \/>\n<meta property=\"article:published_time\" content=\"2014-01-02T15:39:10+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/suherman.asia\/w2\/wp-content\/uploads\/2014\/01\/spatial2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"551\" \/>\n\t<meta property=\"og:image:height\" content=\"484\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\/\/suherman.asia\/w2\/spatial-datatypes-introduced-in-sql-server-2008.html#article\",\"isPartOf\":{\"@id\":\"http:\/\/suherman.asia\/w2\/spatial-datatypes-introduced-in-sql-server-2008.html\"},\"author\":{\"name\":\"admin\",\"@id\":\"http:\/\/suherman.asia\/w2\/#\/schema\/person\/63654a129ee88012961c1a00415967dc\"},\"headline\":\"Spatial Datatypes Introduced in SQL Server 2008\",\"datePublished\":\"2014-01-02T15:39:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/suherman.asia\/w2\/spatial-datatypes-introduced-in-sql-server-2008.html\"},\"wordCount\":235,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\/\/suherman.asia\/w2\/#\/schema\/person\/63654a129ee88012961c1a00415967dc\"},\"image\":{\"@id\":\"http:\/\/suherman.asia\/w2\/spatial-datatypes-introduced-in-sql-server-2008.html#primaryimage\"},\"thumbnailUrl\":\"http:\/\/suherman.asia\/w2\/wp-content\/uploads\/2014\/01\/spatial2.png\",\"keywords\":[\"Datatype\"],\"articleSection\":[\"Spatial\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\/\/suherman.asia\/w2\/spatial-datatypes-introduced-in-sql-server-2008.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/suherman.asia\/w2\/spatial-datatypes-introduced-in-sql-server-2008.html\",\"url\":\"http:\/\/suherman.asia\/w2\/spatial-datatypes-introduced-in-sql-server-2008.html\",\"name\":\"Spatial Datatypes Introduced in SQL Server 2008 - Suherman Blog\",\"isPartOf\":{\"@id\":\"http:\/\/suherman.asia\/w2\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\/\/suherman.asia\/w2\/spatial-datatypes-introduced-in-sql-server-2008.html#primaryimage\"},\"image\":{\"@id\":\"http:\/\/suherman.asia\/w2\/spatial-datatypes-introduced-in-sql-server-2008.html#primaryimage\"},\"thumbnailUrl\":\"http:\/\/suherman.asia\/w2\/wp-content\/uploads\/2014\/01\/spatial2.png\",\"datePublished\":\"2014-01-02T15:39:10+00:00\",\"breadcrumb\":{\"@id\":\"http:\/\/suherman.asia\/w2\/spatial-datatypes-introduced-in-sql-server-2008.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/suherman.asia\/w2\/spatial-datatypes-introduced-in-sql-server-2008.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/suherman.asia\/w2\/spatial-datatypes-introduced-in-sql-server-2008.html#primaryimage\",\"url\":\"http:\/\/suherman.asia\/w2\/wp-content\/uploads\/2014\/01\/spatial2.png\",\"contentUrl\":\"http:\/\/suherman.asia\/w2\/wp-content\/uploads\/2014\/01\/spatial2.png\",\"width\":551,\"height\":484},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/suherman.asia\/w2\/spatial-datatypes-introduced-in-sql-server-2008.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/suherman.asia\/w2\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Spatial Datatypes Introduced in SQL Server 2008\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/suherman.asia\/w2\/#website\",\"url\":\"http:\/\/suherman.asia\/w2\/\",\"name\":\"Suherman Blog\",\"description\":\"Just Another Geek Site\",\"publisher\":{\"@id\":\"http:\/\/suherman.asia\/w2\/#\/schema\/person\/63654a129ee88012961c1a00415967dc\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/suherman.asia\/w2\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"http:\/\/suherman.asia\/w2\/#\/schema\/person\/63654a129ee88012961c1a00415967dc\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/suherman.asia\/w2\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/eed6f889b4c2af2a8c18cb3bf63de6a4?s=96&d=retro&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/eed6f889b4c2af2a8c18cb3bf63de6a4?s=96&d=retro&r=g\",\"caption\":\"admin\"},\"logo\":{\"@id\":\"http:\/\/suherman.asia\/w2\/#\/schema\/person\/image\/\"},\"sameAs\":[\"http:\/\/suherman.asia\",\"https:\/\/www.facebook.com\/emantin34\",\"https:\/\/x.com\/emantin34\"],\"url\":\"http:\/\/suherman.asia\/w2\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Spatial Datatypes Introduced in SQL Server 2008 - Suherman Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/suherman.asia\/w2\/spatial-datatypes-introduced-in-sql-server-2008.html","og_locale":"en_US","og_type":"article","og_title":"Spatial Datatypes Introduced in SQL Server 2008 - Suherman Blog","og_description":"Microsoft SQL Server 2008 memiliki 2 buah type data baru yang dibuat khusus untuk menyimpan spatial data. Tipe data tersebut adalah Geography dan Geometry. Tipe data Geography digunakan untuk menyimpan spatial data jenis Vektor Geodetic sedangkan Geometry digunakan untuk menyimpan spatial data jenis Vektor Planar. Untuk mengetahui Geodetic spatial reference \u2026 Continue reading","og_url":"http:\/\/suherman.asia\/w2\/spatial-datatypes-introduced-in-sql-server-2008.html","og_site_name":"Suherman Blog","article_publisher":"https:\/\/www.facebook.com\/emantin34","article_author":"https:\/\/www.facebook.com\/emantin34","article_published_time":"2014-01-02T15:39:10+00:00","og_image":[{"width":551,"height":484,"url":"http:\/\/suherman.asia\/w2\/wp-content\/uploads\/2014\/01\/spatial2.png","type":"image\/png"}],"author":"admin","twitter_misc":{"Written by":"admin","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/suherman.asia\/w2\/spatial-datatypes-introduced-in-sql-server-2008.html#article","isPartOf":{"@id":"http:\/\/suherman.asia\/w2\/spatial-datatypes-introduced-in-sql-server-2008.html"},"author":{"name":"admin","@id":"http:\/\/suherman.asia\/w2\/#\/schema\/person\/63654a129ee88012961c1a00415967dc"},"headline":"Spatial Datatypes Introduced in SQL Server 2008","datePublished":"2014-01-02T15:39:10+00:00","mainEntityOfPage":{"@id":"http:\/\/suherman.asia\/w2\/spatial-datatypes-introduced-in-sql-server-2008.html"},"wordCount":235,"commentCount":0,"publisher":{"@id":"http:\/\/suherman.asia\/w2\/#\/schema\/person\/63654a129ee88012961c1a00415967dc"},"image":{"@id":"http:\/\/suherman.asia\/w2\/spatial-datatypes-introduced-in-sql-server-2008.html#primaryimage"},"thumbnailUrl":"http:\/\/suherman.asia\/w2\/wp-content\/uploads\/2014\/01\/spatial2.png","keywords":["Datatype"],"articleSection":["Spatial"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/suherman.asia\/w2\/spatial-datatypes-introduced-in-sql-server-2008.html#respond"]}]},{"@type":"WebPage","@id":"http:\/\/suherman.asia\/w2\/spatial-datatypes-introduced-in-sql-server-2008.html","url":"http:\/\/suherman.asia\/w2\/spatial-datatypes-introduced-in-sql-server-2008.html","name":"Spatial Datatypes Introduced in SQL Server 2008 - Suherman Blog","isPartOf":{"@id":"http:\/\/suherman.asia\/w2\/#website"},"primaryImageOfPage":{"@id":"http:\/\/suherman.asia\/w2\/spatial-datatypes-introduced-in-sql-server-2008.html#primaryimage"},"image":{"@id":"http:\/\/suherman.asia\/w2\/spatial-datatypes-introduced-in-sql-server-2008.html#primaryimage"},"thumbnailUrl":"http:\/\/suherman.asia\/w2\/wp-content\/uploads\/2014\/01\/spatial2.png","datePublished":"2014-01-02T15:39:10+00:00","breadcrumb":{"@id":"http:\/\/suherman.asia\/w2\/spatial-datatypes-introduced-in-sql-server-2008.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/suherman.asia\/w2\/spatial-datatypes-introduced-in-sql-server-2008.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/suherman.asia\/w2\/spatial-datatypes-introduced-in-sql-server-2008.html#primaryimage","url":"http:\/\/suherman.asia\/w2\/wp-content\/uploads\/2014\/01\/spatial2.png","contentUrl":"http:\/\/suherman.asia\/w2\/wp-content\/uploads\/2014\/01\/spatial2.png","width":551,"height":484},{"@type":"BreadcrumbList","@id":"http:\/\/suherman.asia\/w2\/spatial-datatypes-introduced-in-sql-server-2008.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/suherman.asia\/w2"},{"@type":"ListItem","position":2,"name":"Spatial Datatypes Introduced in SQL Server 2008"}]},{"@type":"WebSite","@id":"http:\/\/suherman.asia\/w2\/#website","url":"http:\/\/suherman.asia\/w2\/","name":"Suherman Blog","description":"Just Another Geek Site","publisher":{"@id":"http:\/\/suherman.asia\/w2\/#\/schema\/person\/63654a129ee88012961c1a00415967dc"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/suherman.asia\/w2\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"http:\/\/suherman.asia\/w2\/#\/schema\/person\/63654a129ee88012961c1a00415967dc","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/suherman.asia\/w2\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/eed6f889b4c2af2a8c18cb3bf63de6a4?s=96&d=retro&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/eed6f889b4c2af2a8c18cb3bf63de6a4?s=96&d=retro&r=g","caption":"admin"},"logo":{"@id":"http:\/\/suherman.asia\/w2\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/suherman.asia","https:\/\/www.facebook.com\/emantin34","https:\/\/x.com\/emantin34"],"url":"http:\/\/suherman.asia\/w2\/author\/admin"}]}},"_links":{"self":[{"href":"http:\/\/suherman.asia\/w2\/wp-json\/wp\/v2\/posts\/119","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/suherman.asia\/w2\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/suherman.asia\/w2\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/suherman.asia\/w2\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/suherman.asia\/w2\/wp-json\/wp\/v2\/comments?post=119"}],"version-history":[{"count":1,"href":"http:\/\/suherman.asia\/w2\/wp-json\/wp\/v2\/posts\/119\/revisions"}],"predecessor-version":[{"id":121,"href":"http:\/\/suherman.asia\/w2\/wp-json\/wp\/v2\/posts\/119\/revisions\/121"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/suherman.asia\/w2\/wp-json\/wp\/v2\/media\/120"}],"wp:attachment":[{"href":"http:\/\/suherman.asia\/w2\/wp-json\/wp\/v2\/media?parent=119"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/suherman.asia\/w2\/wp-json\/wp\/v2\/categories?post=119"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/suherman.asia\/w2\/wp-json\/wp\/v2\/tags?post=119"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}