{"id":4652,"date":"2017-03-03T17:22:55","date_gmt":"2017-03-03T08:22:55","guid":{"rendered":"http:\/\/www.gisdeveloper.co.kr\/?p=4652"},"modified":"2020-05-28T15:45:27","modified_gmt":"2020-05-28T06:45:27","slug":"java-%ec%98%a4%ed%94%88%ec%86%8c%ec%8a%a4-kml-%eb%ac%b8%ec%84%9c-%ec%83%9d%ec%84%b1-%eb%9d%bc%ec%9d%b4%eb%b8%8c%eb%9f%ac%eb%a6%ac-kmlwriter-v0-1","status":"publish","type":"post","link":"http:\/\/www.gisdeveloper.co.kr\/?p=4652","title":{"rendered":"[Java] \uc624\ud508\uc18c\uc2a4 KML \ubb38\uc11c \uc0dd\uc131 \ub77c\uc774\ube0c\ub7ec\ub9ac &#8211; kmlwriter v0.1"},"content":{"rendered":"<p>\uacf5\uac04 \uc11c\ubc84 \ub2e8\uc5d0\uc11c kml \ubb38\uc11c\ub97c \uc0dd\uc131\ud574 \uc8fc\ub294 \uae30\ub2a5\uc744 \uac1c\ubc1c\ud558\uba74\uc11c Point, Polyline, Polygon \uc694\uc18c\uc5d0 \ub300\ud55c kml \ubb38\uc11c\ub97c \uc0dd\uc131\ud574 \uc8fc\ub294 Java \ub77c\uc774\ube0c\ub7ec\ub9ac\ub97c \ub9cc\ub4e4\uc5b4 \uc0ac\uc6a9\ud588\ub294\ub370\uc694. \uc774\uc5d0 \ub300\ud574 \uacf5\uac1c\ud569\ub2c8\ub2e4. \ub2e8\uc21c\ud788 \uc88c\ud45c\uc5d0 \ub300\ud55c \ud615\uc0c1 \uc815\ubcf4\ub9cc\uc744 \uc0dd\uc131\ud574 \uc8fc\ub294 \ub77c\uc774\ube0c\ub7ec\ub9ac\uc774\uace0 style\uacfc \uac19\uc740 \ub0b4\uc6a9\uc740 \uc544\uc9c1 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. \uc774 \ub77c\uc774\ube0c\ub7ec\ub9ac\uc758 \ud074\ub798\uc2a4 \uad6c\uc870\ub3c4\ub294 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.gisdeveloper.co.kr\/wp-content\/uploads\/2017\/03\/Main.png\" alt=\"\" width=\"1470\" height=\"668\" class=\"aligncenter size-full wp-image-4653\" \/><\/p>\n<p>\uc774 \ub77c\uc774\ube0c\ub7ec\ub9ac\ub97c \uc774\uc6a9\ud574 Point\uc5d0 \ub300\ud55c kml \ubb38\uc11c\ub97c \uc0dd\uc131\ud574 \uc8fc\ub294 \ucf54\ub4dc\uc758 \uc608\ub294 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">\r\nimport java.util.LinkedList;\r\n\r\nimport geoservice.kmlwriter.Coordinate;\r\nimport geoservice.kmlwriter.Document;\r\nimport geoservice.kmlwriter.IGeometry;\r\nimport geoservice.kmlwriter.LineString;\r\nimport geoservice.kmlwriter.LinearRing;\r\nimport geoservice.kmlwriter.Placemark;\r\nimport geoservice.kmlwriter.Point;\r\nimport geoservice.kmlwriter.Polygon;\r\n\r\npublic class MainEntry {\r\n\r\n    private static String testPointPlaceMarkKML() {\r\n        Document kmlDoc = new Document();\r\n\r\n        Coordinate coord = new Coordinate(128, 38); \/\/(\uacbd\ub3c4, \uc704\ub3c4)\r\n        IGeometry geom = new Point(coord);\r\n        Placemark placemark = new Placemark(geom, \"My Point Placemark\");\r\n        kmlDoc.addPlacemark(placemark);\r\n\r\n        String kml = kmlDoc.build();\r\n\t\t\r\n        return kml;\r\n    }\r\n\r\n    ....<\/pre>\n<p>Polyline\uc5d0 \ub300\ud55c kml \ubb38\uc11c\ub97c \uc0dd\uc131\ud574 \uc8fc\ub294 \ucf54\ub4dc\ub294 \uc544\ub798\uc640 \uac19\uc2b5\ub2c8\ub2e4.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">\r\nimport java.util.LinkedList;\r\n\r\nimport geoservice.kmlwriter.Coordinate;\r\nimport geoservice.kmlwriter.Document;\r\nimport geoservice.kmlwriter.IGeometry;\r\nimport geoservice.kmlwriter.LineString;\r\nimport geoservice.kmlwriter.LinearRing;\r\nimport geoservice.kmlwriter.Placemark;\r\nimport geoservice.kmlwriter.Point;\r\nimport geoservice.kmlwriter.Polygon;\r\n\r\npublic class MainEntry {\r\n\r\n    private static String testPolylinePlaceMarkKML() {\r\n        Document kmlDoc = new Document();\r\n\t\t\r\n        LinkedList&lt;Coordinate> coords = new LinkedList&lt;Coordinate>();\r\n        coords.add(new Coordinate(128, 38));\r\n        coords.add(new Coordinate(129, 38));\r\n        coords.add(new Coordinate(129, 39));\r\n\r\n        IGeometry kmlGeom = new LineString(coords);\r\n        Placemark placemark = new Placemark(kmlGeom, \"My Polyline Placemark\");\r\n        kmlDoc.addPlacemark(placemark);\r\n\t\t\r\n        String kml = kmlDoc.build();\r\n\t\t\r\n        return kml;\r\n    }\r\n\r\n    ....<\/pre>\n<p>Polygon\uc5d0 \ub300\ud55c kml \ubb38\uc11c\ub97c \uc0dd\uc131\ud574 \uc8fc\ub294 \ucf54\ub4dc\uc785\ub2c8\ub2e4.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">\r\nimport java.util.LinkedList;\r\n\r\nimport geoservice.kmlwriter.Coordinate;\r\nimport geoservice.kmlwriter.Document;\r\nimport geoservice.kmlwriter.IGeometry;\r\nimport geoservice.kmlwriter.LineString;\r\nimport geoservice.kmlwriter.LinearRing;\r\nimport geoservice.kmlwriter.Placemark;\r\nimport geoservice.kmlwriter.Point;\r\nimport geoservice.kmlwriter.Polygon;\r\n\r\npublic class MainEntry {\r\n\t\r\n    private static String testPolygonPlaceMarkKML() {\r\n        Document kmlDoc = new Document();\r\n        LinkedList&lt;LinearRing> rings = new LinkedList&lt;LinearRing>();\r\n\r\n        LinkedList&lt;Coordinate> outer_coords = new LinkedList&lt;Coordinate>();\r\n        outer_coords.add(new Coordinate(128, 38));\r\n        outer_coords.add(new Coordinate(129, 38));\r\n        outer_coords.add(new Coordinate(129, 39));\r\n        outer_coords.add(new Coordinate(128, 39));\r\n        outer_coords.add(new Coordinate(128, 38));\r\n\r\n        LinkedList&lt;Coordinate> inner_coords = new LinkedList&lt;Coordinate>();\r\n        inner_coords.add(new Coordinate(128.25, 38.25));\r\n        inner_coords.add(new Coordinate(128.75, 38.25));\r\n        inner_coords.add(new Coordinate(128.75, 38.75));\r\n        inner_coords.add(new Coordinate(128.25, 38.75));\r\n        inner_coords.add(new Coordinate(128.25, 38.25));\r\n\r\n        rings.add(new LinearRing(outer_coords, true));\r\n        rings.add(new LinearRing(inner_coords, false));\r\n\r\n        IGeometry kmlGeom = new Polygon(rings);\r\n        Placemark placemark = new Placemark(kmlGeom, \"My Polygon Placemark\");\r\n        kmlDoc.addPlacemark(placemark);\r\n\r\n        String kml = kmlDoc.build();\r\n\r\n        return kml;\r\n    }\r\n\r\n    ....\r\n<\/pre>\n<p>\ud3f4\ub9ac\uace4\uc758 \uc678\ubd80\uc640 \ub0b4\ubd80\uc5d0 \ub300\ud55c \ubd80\ubd84\uc740 35\ubc88\uacfc 36\ubc88\ucc98\ub7fc LinearRing \ud074\ub798\uc2a4\uc758 \uc0dd\uc131\uc790\uc758 \ub450\ubc88\uc9f8 \uc778\uc790\uc5d0\uc11c \uc9c0\uc815\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc704\uc758 Polygon\uc5d0 \ub300\ud55c kml \uc0dd\uc131 \uc608\uc81c \ucf54\ub4dc\ub97c \ud1b5\ud574 \uc0dd\uc131\ub41c kml \ubb38\uc11c\ub97c \uad6c\uae00\uc5b4\uc2a4\uc5d0\uc11c \uc0b4\ud3b4\ubcf4\uba74 \uc544\ub798 \ud654\uba74\uc5d0 \uac19\uc2b5\ub2c8\ub2e4.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.gisdeveloper.co.kr\/wp-content\/uploads\/2017\/03\/google_earth.png\" alt=\"\" width=\"750\" class=\"aligncenter size-full wp-image-4658\" \/><\/p>\n<p>\uc774 \ub77c\uc774\ube0c\ub7ec\ub9ac\uc758 \uc18c\uc2a4\ucf54\ub4dc\ub294 \uc544\ub798\uc758 \ub9c1\ud06c\ub97c \ud1b5\ud574 \ub2e4\uc6b4\ub85c\ub4dc \ubc1b\uc744 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<p style='text-align:center'><a href=\"http:\/\/www.gisdeveloper.co.kr\/wp-content\/uploads\/2017\/03\/kmlwriter.zip\"><img width='64' src='\/images\/download.svg' \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uacf5\uac04 \uc11c\ubc84 \ub2e8\uc5d0\uc11c kml \ubb38\uc11c\ub97c \uc0dd\uc131\ud574 \uc8fc\ub294 \uae30\ub2a5\uc744 \uac1c\ubc1c\ud558\uba74\uc11c Point, Polyline, Polygon \uc694\uc18c\uc5d0 \ub300\ud55c kml \ubb38\uc11c\ub97c \uc0dd\uc131\ud574 \uc8fc\ub294 Java \ub77c\uc774\ube0c\ub7ec\ub9ac\ub97c \ub9cc\ub4e4\uc5b4 \uc0ac\uc6a9\ud588\ub294\ub370\uc694. \uc774\uc5d0 \ub300\ud574 \uacf5\uac1c\ud569\ub2c8\ub2e4. \ub2e8\uc21c\ud788 \uc88c\ud45c\uc5d0 \ub300\ud55c \ud615\uc0c1 \uc815\ubcf4\ub9cc\uc744 \uc0dd\uc131\ud574 \uc8fc\ub294 \ub77c\uc774\ube0c\ub7ec\ub9ac\uc774\uace0 style\uacfc \uac19\uc740 \ub0b4\uc6a9\uc740 \uc544\uc9c1 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. \uc774 \ub77c\uc774\ube0c\ub7ec\ub9ac\uc758 \ud074\ub798\uc2a4 \uad6c\uc870\ub3c4\ub294 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4. \uc774 \ub77c\uc774\ube0c\ub7ec\ub9ac\ub97c \uc774\uc6a9\ud574 Point\uc5d0 \ub300\ud55c kml \ubb38\uc11c\ub97c \uc0dd\uc131\ud574 \uc8fc\ub294 \ucf54\ub4dc\uc758 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/www.gisdeveloper.co.kr\/?p=4652\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;[Java] \uc624\ud508\uc18c\uc2a4 KML \ubb38\uc11c \uc0dd\uc131 \ub77c\uc774\ube0c\ub7ec\ub9ac &#8211; kmlwriter v0.1&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[50],"tags":[],"class_list":["post-4652","post","type-post","status-publish","format-standard","hentry","category-gisdev"],"_links":{"self":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/4652","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4652"}],"version-history":[{"count":10,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/4652\/revisions"}],"predecessor-version":[{"id":9686,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/4652\/revisions\/9686"}],"wp:attachment":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4652"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4652"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4652"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}