{"id":231,"date":"2014-03-07T00:06:07","date_gmt":"2014-03-06T16:06:07","guid":{"rendered":"http:\/\/suherman.asia\/w2\/?p=231"},"modified":"2014-03-07T00:10:44","modified_gmt":"2014-03-06T16:10:44","slug":"convert-lat-lon-geography-datatype","status":"publish","type":"post","link":"http:\/\/suherman.asia\/w2\/convert-lat-lon-geography-datatype.html","title":{"rendered":"Convert Lat Lon to Geography Datatype"},"content":{"rendered":"<p>Biasanya kita melakukan survey menggunakan alat GPS, dari hasil survey diperoleh posisi-posisi dari target survey. Misal kita melakukan survey pelanggan, dan setiap pelanggan di identifikasi dengan menggunakan Point.<!--more--><\/p>\n<p>Informasi yang diperoleh dari GPS biasanya berupa koordinat angka Latitude dan Longitude misal seperti ini<\/p>\n<table width=\"148\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<colgroup>\n<col width=\"64\" \/>\n<col width=\"84\" \/> <\/colgroup>\n<tbody>\n<tr>\n<td width=\"64\" height=\"17\"><strong>Latitude<\/strong><\/td>\n<td width=\"84\"><strong>Longitude<\/strong><\/td>\n<\/tr>\n<tr>\n<td align=\"right\" height=\"17\">-7.01415<\/td>\n<td align=\"right\">110.443<\/td>\n<\/tr>\n<tr>\n<td align=\"right\" height=\"17\">-7.01628<\/td>\n<td align=\"right\">110.441<\/td>\n<\/tr>\n<tr>\n<td align=\"right\" height=\"17\">-7.01774<\/td>\n<td align=\"right\">110.439<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>nah, untuk menyimpannya kedalam SQL Server spatial adalah kita dapat lakukan seperti ini :<\/p>\n<p>buat table Customer :<\/p>\n<pre class=\"theme:ssms2012 lang:tsql decode:true\" title=\"Create Table Customer\">Create table dbo.Customer\r\n(Idcust int IDENTITY(1,1) NOT NULL,\r\nCustName varchar(50),Shape geography,\r\nCONSTRAINT [PK_Customer] PRIMARY KEY CLUSTERED\r\n(\r\nIdcust ASC)\r\n)<\/pre>\n<p>nah, untuk mengubah informasi lat lon tersebut menjadi type data spatial dapat dilakukan dengan cara berikut :<\/p>\n<pre class=\"theme:ssms2012 lang:tsql decode:true\">DECLARE @g geography; \r\nSET @g = geography::Point(-7.01415, 110.443, 4326)<\/pre>\n<p>dan cara memasukkan data ke table customernya dapat dilakukan dengan cara berikut :<\/p>\n<pre class=\"theme:ssms2012 lang:tsql decode:true\" title=\"Memasukkan Data Spatial\">DECLARE @g geography; \r\nSET @g = geography::Point(-7.01415, 110.443, 4326)\r\ninsert into dbo.Customer(CustName,Shape)\r\nvalues('Suherman',@g)<\/pre>\n<p>Demikian, semoga bermanfaat.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Biasanya kita melakukan survey menggunakan alat GPS, dari hasil survey diperoleh posisi-posisi dari target survey. Misal kita melakukan survey pelanggan, dan setiap pelanggan di identifikasi dengan menggunakan Point.<\/p>\n<p class=\"continue-reading-button\"> <a class=\"continue-reading-link\" href=\"http:\/\/suherman.asia\/w2\/convert-lat-lon-geography-datatype.html\">Continue reading<i class=\"crycon-right-dir\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":154,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[49,64,63,56,14],"class_list":["post-231","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-spatial","tag-geography","tag-gps","tag-point","tag-sql-server-spatial","tag-t-sql"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Convert Lat Lon to Geography Datatype - Suherman Blog<\/title>\n<meta name=\"description\" content=\"Convert Lat Lon to Geography Datatype\" \/>\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\/convert-lat-lon-geography-datatype.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Convert Lat Lon to Geography Datatype - Suherman Blog\" \/>\n<meta property=\"og:description\" content=\"Convert Lat Lon to Geography Datatype\" \/>\n<meta property=\"og:url\" content=\"http:\/\/suherman.asia\/w2\/convert-lat-lon-geography-datatype.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-03-06T16:06:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-03-06T16:10:44+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/suherman.asia\/w2\/wp-content\/uploads\/2014\/01\/wmstut.png\" \/>\n\t<meta property=\"og:image:width\" content=\"476\" \/>\n\t<meta property=\"og:image:height\" content=\"261\" \/>\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\/convert-lat-lon-geography-datatype.html#article\",\"isPartOf\":{\"@id\":\"http:\/\/suherman.asia\/w2\/convert-lat-lon-geography-datatype.html\"},\"author\":{\"name\":\"admin\",\"@id\":\"http:\/\/suherman.asia\/w2\/#\/schema\/person\/63654a129ee88012961c1a00415967dc\"},\"headline\":\"Convert Lat Lon to Geography Datatype\",\"datePublished\":\"2014-03-06T16:06:07+00:00\",\"dateModified\":\"2014-03-06T16:10:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/suherman.asia\/w2\/convert-lat-lon-geography-datatype.html\"},\"wordCount\":104,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\/\/suherman.asia\/w2\/#\/schema\/person\/63654a129ee88012961c1a00415967dc\"},\"image\":{\"@id\":\"http:\/\/suherman.asia\/w2\/convert-lat-lon-geography-datatype.html#primaryimage\"},\"thumbnailUrl\":\"http:\/\/suherman.asia\/w2\/wp-content\/uploads\/2014\/01\/wmstut.png\",\"keywords\":[\"Geography\",\"GPS\",\"Point\",\"SQL Server Spatial\",\"T-SQL\"],\"articleSection\":[\"Spatial\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\/\/suherman.asia\/w2\/convert-lat-lon-geography-datatype.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/suherman.asia\/w2\/convert-lat-lon-geography-datatype.html\",\"url\":\"http:\/\/suherman.asia\/w2\/convert-lat-lon-geography-datatype.html\",\"name\":\"Convert Lat Lon to Geography Datatype - Suherman Blog\",\"isPartOf\":{\"@id\":\"http:\/\/suherman.asia\/w2\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\/\/suherman.asia\/w2\/convert-lat-lon-geography-datatype.html#primaryimage\"},\"image\":{\"@id\":\"http:\/\/suherman.asia\/w2\/convert-lat-lon-geography-datatype.html#primaryimage\"},\"thumbnailUrl\":\"http:\/\/suherman.asia\/w2\/wp-content\/uploads\/2014\/01\/wmstut.png\",\"datePublished\":\"2014-03-06T16:06:07+00:00\",\"dateModified\":\"2014-03-06T16:10:44+00:00\",\"description\":\"Convert Lat Lon to Geography Datatype\",\"breadcrumb\":{\"@id\":\"http:\/\/suherman.asia\/w2\/convert-lat-lon-geography-datatype.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/suherman.asia\/w2\/convert-lat-lon-geography-datatype.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/suherman.asia\/w2\/convert-lat-lon-geography-datatype.html#primaryimage\",\"url\":\"http:\/\/suherman.asia\/w2\/wp-content\/uploads\/2014\/01\/wmstut.png\",\"contentUrl\":\"http:\/\/suherman.asia\/w2\/wp-content\/uploads\/2014\/01\/wmstut.png\",\"width\":476,\"height\":261},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/suherman.asia\/w2\/convert-lat-lon-geography-datatype.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/suherman.asia\/w2\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Convert Lat Lon to Geography Datatype\"}]},{\"@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":"Convert Lat Lon to Geography Datatype - Suherman Blog","description":"Convert Lat Lon to Geography Datatype","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\/convert-lat-lon-geography-datatype.html","og_locale":"en_US","og_type":"article","og_title":"Convert Lat Lon to Geography Datatype - Suherman Blog","og_description":"Convert Lat Lon to Geography Datatype","og_url":"http:\/\/suherman.asia\/w2\/convert-lat-lon-geography-datatype.html","og_site_name":"Suherman Blog","article_publisher":"https:\/\/www.facebook.com\/emantin34","article_author":"https:\/\/www.facebook.com\/emantin34","article_published_time":"2014-03-06T16:06:07+00:00","article_modified_time":"2014-03-06T16:10:44+00:00","og_image":[{"width":476,"height":261,"url":"http:\/\/suherman.asia\/w2\/wp-content\/uploads\/2014\/01\/wmstut.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\/convert-lat-lon-geography-datatype.html#article","isPartOf":{"@id":"http:\/\/suherman.asia\/w2\/convert-lat-lon-geography-datatype.html"},"author":{"name":"admin","@id":"http:\/\/suherman.asia\/w2\/#\/schema\/person\/63654a129ee88012961c1a00415967dc"},"headline":"Convert Lat Lon to Geography Datatype","datePublished":"2014-03-06T16:06:07+00:00","dateModified":"2014-03-06T16:10:44+00:00","mainEntityOfPage":{"@id":"http:\/\/suherman.asia\/w2\/convert-lat-lon-geography-datatype.html"},"wordCount":104,"commentCount":0,"publisher":{"@id":"http:\/\/suherman.asia\/w2\/#\/schema\/person\/63654a129ee88012961c1a00415967dc"},"image":{"@id":"http:\/\/suherman.asia\/w2\/convert-lat-lon-geography-datatype.html#primaryimage"},"thumbnailUrl":"http:\/\/suherman.asia\/w2\/wp-content\/uploads\/2014\/01\/wmstut.png","keywords":["Geography","GPS","Point","SQL Server Spatial","T-SQL"],"articleSection":["Spatial"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/suherman.asia\/w2\/convert-lat-lon-geography-datatype.html#respond"]}]},{"@type":"WebPage","@id":"http:\/\/suherman.asia\/w2\/convert-lat-lon-geography-datatype.html","url":"http:\/\/suherman.asia\/w2\/convert-lat-lon-geography-datatype.html","name":"Convert Lat Lon to Geography Datatype - Suherman Blog","isPartOf":{"@id":"http:\/\/suherman.asia\/w2\/#website"},"primaryImageOfPage":{"@id":"http:\/\/suherman.asia\/w2\/convert-lat-lon-geography-datatype.html#primaryimage"},"image":{"@id":"http:\/\/suherman.asia\/w2\/convert-lat-lon-geography-datatype.html#primaryimage"},"thumbnailUrl":"http:\/\/suherman.asia\/w2\/wp-content\/uploads\/2014\/01\/wmstut.png","datePublished":"2014-03-06T16:06:07+00:00","dateModified":"2014-03-06T16:10:44+00:00","description":"Convert Lat Lon to Geography Datatype","breadcrumb":{"@id":"http:\/\/suherman.asia\/w2\/convert-lat-lon-geography-datatype.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/suherman.asia\/w2\/convert-lat-lon-geography-datatype.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/suherman.asia\/w2\/convert-lat-lon-geography-datatype.html#primaryimage","url":"http:\/\/suherman.asia\/w2\/wp-content\/uploads\/2014\/01\/wmstut.png","contentUrl":"http:\/\/suherman.asia\/w2\/wp-content\/uploads\/2014\/01\/wmstut.png","width":476,"height":261},{"@type":"BreadcrumbList","@id":"http:\/\/suherman.asia\/w2\/convert-lat-lon-geography-datatype.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/suherman.asia\/w2"},{"@type":"ListItem","position":2,"name":"Convert Lat Lon to Geography Datatype"}]},{"@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\/231","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=231"}],"version-history":[{"count":4,"href":"http:\/\/suherman.asia\/w2\/wp-json\/wp\/v2\/posts\/231\/revisions"}],"predecessor-version":[{"id":236,"href":"http:\/\/suherman.asia\/w2\/wp-json\/wp\/v2\/posts\/231\/revisions\/236"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/suherman.asia\/w2\/wp-json\/wp\/v2\/media\/154"}],"wp:attachment":[{"href":"http:\/\/suherman.asia\/w2\/wp-json\/wp\/v2\/media?parent=231"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/suherman.asia\/w2\/wp-json\/wp\/v2\/categories?post=231"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/suherman.asia\/w2\/wp-json\/wp\/v2\/tags?post=231"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}