{"id":1002,"date":"2009-11-07T03:41:14","date_gmt":"2009-11-07T03:41:14","guid":{"rendered":"http:\/\/www.gisdeveloper.co.kr\/?p=1002"},"modified":"2017-01-29T09:50:57","modified_gmt":"2017-01-29T00:50:58","slug":"arcobjects-%eb%8f%84%ed%98%95%ec%9d%98-%ec%a2%8c%ed%91%9c-%ea%b5%ac%ed%95%98%ea%b8%b0","status":"publish","type":"post","link":"http:\/\/www.gisdeveloper.co.kr\/?p=1002","title":{"rendered":"[GIS] ArcObjects, \ub3c4\ud615\uc758 \uc88c\ud45c \uad6c\ud558\uae30"},"content":{"rendered":"<p>ArcObjects\ub97c \ud1b5\ud574 SHP \ud30c\uc77c\uc744 \uc77d\uc5b4\uc11c \ub9cc\ub4e0 \ub808\uc774\uc5b4\ub97c \ud654\uba74\uc0c1\uc5d0 \ud45c\uc2dc\ud55c \ud6c4&#8230; \uc774 \ub808\uc774\uc5b4\ub97c \uad6c\uc131\ud558\ub294 \ub3c4\ud615(Shape) \uc88c\ud45c\ub97c \uad6c\ud558\ub294 \ubc29\ubc95\uc744 \uc815\ub9ac\ud574 \ubcf4\uc558\uc2b5\ub2c8\ub2e4. ArcObjects\uc5d0\uc11c \uc81c\uacf5\ud558\ub294 Map \ucee8\ud2b8\ub864\uc744 \ud1b5\ud574 SHP \ub808\uc774\uc5b4\uac00 \ud558\ub098 \ucd94\uac00\ub418\uc5c8\ub2e4\uace0 \uac00\uc815\ud558\uaca0\uc2b5\ub2c8\ub2e4. \ucc38\uace0\ub85c \uc774 \ud3ec\uc2a4\ud2b8\ub294 \ub808\uc774\uc5b4\uac00 \ud3f4\ub9ac\uace4 \ub3c4\ud615\uc73c\ub85c \uad6c\uc131\ub41c \ub808\uc774\uc5b4\ub97c \ub300\uc0c1\uc73c\ub85c \ud569\ub2c8\ub2e4.<\/p>\n<p>\uac00\uc7a5 \uba3c\uc800 \ud574\uc57c\ud560 \uc77c\uc740 \uc9c0\ub3c4 \ucee8\ud2b8\ub864\uc774 \uac00\uc9c0\uace0 \uc788\ub294 \ub808\uc774\uc5b4\ub97c \uac00\uc838\uc624\ub294 \uc77c\uc785\ub2c8\ub2e4. \uac00\uc838\uc62c\ub54c \ub3c4\ud615 \uc815\ubcf4\uc5d0 \uc811\uadfc\ud574\uc57c \ud558\ubbc0\ub85c IFeatureLayer \uc778\ud130\ud398\uc774\uc2a4 \ud0c0\uc785\uc73c\ub85c \uac00\uc838\uc640\uc57c \ud569\ub2c8\ub2e4.<\/p>\n<pre>\r\nESRI.ArcGIS.Carto.IFeatureLayer pFL;\r\npFL = axMapControl1.get_Layer(0) as ESRI.ArcGIS.Carto.IFeatureLayer;<\/pre>\n<p>\uc774\ub807\uac8c \uac00\uc838\uc628 IFeatureLayer \ubcc0\uc218\uc778 pFL\uc744 \ud1b5\ud574 \uac01\uac01\uc758 Feature\ub97c \uc5bb\uc5b4\uc624\uae30 \uc704\ud574 IFeatureClass\uc640 IFeatureCursor\ub97c \uc774\uc6a9\ud569\ub2c8\ub2e4.<\/p>\n<pre>\r\nESRI.ArcGIS.Geodatabase.IFeatureClass pFClass;\r\npFClass = pFL.FeatureClass;\r\n\r\nESRI.ArcGIS.Geodatabase.IFeatureCursor pFCursor;\r\npFCursor = pFClass.Search(null, false);<\/pre>\n<p>\uc774\uc81c \ub808\uc774\uc5b4\ub97c \uad6c\uc131\ud558\ub294 Feature\ub97c \uc77d\uc744 \uc218 \uc788\ub294 \uc900\ube44\uac00 \ub418\uc5c8\uc2b5\ub2c8\ub2e4. \uc544\ub798\uc758 \ubc18\ubcf5\ubb38\uc744 \ud1b5\ud574 \uac01\uac01\uc758 Feature\ub97c \uc21c\ud68c\ud558\uba74\uc11c \uc6d0\ud558\ub294 \uc88c\ud45c\ub97c \uc77d\uac8c \ub429\ub2c8\ub2e4.<\/p>\n<pre>\r\nESRI.ArcGIS.Geodatabase.IFeature pFeature; \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\r\nwhile((pFeature=pFCursor.NextFeature()) != null) {\r\n\u00a0 \u00a0 ....\r\n}<\/pre>\n<p>\uc544\ub798\uc758 \ucf54\ub4dc\uac00 \uc704\uc758 \ucf54\ub4dc\uc758 \ubc18\ubcf5\ubb38 \uc0ac\uc774(while\ubb38)\uc5d0 \ub4e4\uc5b4\uac00\ub294 \ucf54\ub4dc\uc785\ub2c8\ub2e4. \ub3c4\ud615\uc740 Point\uc758 \uc9d1\ud569\uc774\ubbc0\ub85c IPointCollection \uc778\ud130\ud398\uc774\uc2a4 \ud0c0\uc785\uc774 \ud544\uc694\ud558\uba70 \uac01 \ud3ec\uc778\ud2b8 \uc88c\ud45c\uac12\uacfc \uad00\ub828 \uc815\ubcf4\ub97c \uc5bb\uae30 \uc704\ud574 IEnumVertex \uc778\ud130\ud398\uc774\uc2a4\uac00 \ud544\uc694\ud569\ub2c8\ub2e4.<\/p>\n<pre>\r\n\u00a0 \u00a0 ESRI.ArcGIS.Geometry.IPointCollection pPC;\r\n\u00a0 \u00a0 pPC = pFeature.Shape as ESRI.ArcGIS.Geometry.IPointCollection;\r\n\r\n\u00a0 \u00a0 ESRI.ArcGIS.Geometry.IEnumVertex pEV = pPC.EnumVertices;\r\n\r\n\u00a0 \u00a0 ESRI.ArcGIS.Geometry.IPoint pPt;\r\n\u00a0 \u00a0 int outPartIndex;\r\n\u00a0 \u00a0 int vertexIndex;\r\n\u00a0 \u00a0 listBox1.Items.Add(\"FID: \" + pFeature.OID);\r\n\u00a0 \u00a0 for(int i=0; i&lt;pPC.PointCount; ++i) {\r\n\u00a0 \u00a0 \u00a0 \u00a0 pEV.Next(out pPt, out outPartIndex, out vertexIndex);\r\n\u00a0 \u00a0 \u00a0 \u00a0 listBox1.Items.Add(\" \u00a0\u00a0 Part Idx :\" + outPartIndex + \r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \" Vertex Idx : \" + vertexIndex + \" (\" + pPt.X + \",\" + pPt.Y + \")\");\r\n\u00a0 \u00a0 }<\/pre>\n<p>\ube44\ub85d \uc774 \ud3ec\uc2a4\ud2b8\uc758 \uae00\uc740 \ud3f4\ub9ac\uace4 \ub808\uc774\uc5b4\uc5d0 \ub300\ud55c \ub0b4\uc6a9\uc774\uc9c0\ub9cc \uc774 \ubcf4\ub2e4 \uac04\ub2e8\ud55c \ud3ec\uc778\ud2b8\ub098 \ud3f4\ub9ac\ub77c\uc778\uc5d0 \ub300\ud574\uc11c\ub3c4 \uc27d\uac8c \uc88c\ud45c\ub97c \uc77d\uc744 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \ub9c8\uc9c0\ub9c9\uc73c\ub85c \uc544\ub798\ub294 \uc704\uc758 \ucf54\ub4dc\ub4e4\uc744 \uc2e4\ud589\ud588\uc744\ub54c\uc758 \uacb0\uacfc \uc785\ub2c8\ub2e4.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/www.gisdeveloper.co.kr\/wp-content\/uploads\/1\/1352832862.jpg\" alt=\"\uc0ac\uc6a9\uc790 \uc0bd\uc785 \uc774\ubbf8\uc9c0\" width=\"350\" height=\"440\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>ArcObjects\ub97c \ud1b5\ud574 SHP \ud30c\uc77c\uc744 \uc77d\uc5b4\uc11c \ub9cc\ub4e0 \ub808\uc774\uc5b4\ub97c \ud654\uba74\uc0c1\uc5d0 \ud45c\uc2dc\ud55c \ud6c4&#8230; \uc774 \ub808\uc774\uc5b4\ub97c \uad6c\uc131\ud558\ub294 \ub3c4\ud615(Shape) \uc88c\ud45c\ub97c \uad6c\ud558\ub294 \ubc29\ubc95\uc744 \uc815\ub9ac\ud574 \ubcf4\uc558\uc2b5\ub2c8\ub2e4. ArcObjects\uc5d0\uc11c \uc81c\uacf5\ud558\ub294 Map \ucee8\ud2b8\ub864\uc744 \ud1b5\ud574 SHP \ub808\uc774\uc5b4\uac00 \ud558\ub098 \ucd94\uac00\ub418\uc5c8\ub2e4\uace0 \uac00\uc815\ud558\uaca0\uc2b5\ub2c8\ub2e4. \ucc38\uace0\ub85c \uc774 \ud3ec\uc2a4\ud2b8\ub294 \ub808\uc774\uc5b4\uac00 \ud3f4\ub9ac\uace4 \ub3c4\ud615\uc73c\ub85c \uad6c\uc131\ub41c \ub808\uc774\uc5b4\ub97c \ub300\uc0c1\uc73c\ub85c \ud569\ub2c8\ub2e4. \uac00\uc7a5 \uba3c\uc800 \ud574\uc57c\ud560 \uc77c\uc740 \uc9c0\ub3c4 \ucee8\ud2b8\ub864\uc774 \uac00\uc9c0\uace0 \uc788\ub294 \ub808\uc774\uc5b4\ub97c \uac00\uc838\uc624\ub294 \uc77c\uc785\ub2c8\ub2e4. \uac00\uc838\uc62c\ub54c \ub3c4\ud615 \uc815\ubcf4\uc5d0 \uc811\uadfc\ud574\uc57c \ud558\ubbc0\ub85c &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/www.gisdeveloper.co.kr\/?p=1002\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;[GIS] ArcObjects, \ub3c4\ud615\uc758 \uc88c\ud45c \uad6c\ud558\uae30&#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":[49],"tags":[48,5],"class_list":["post-1002","post","type-post","status-publish","format-standard","hentry","category-arcobjects","tag-arcobjects","tag-gis"],"_links":{"self":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/1002","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=1002"}],"version-history":[{"count":1,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/1002\/revisions"}],"predecessor-version":[{"id":3408,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/1002\/revisions\/3408"}],"wp:attachment":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1002"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1002"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1002"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}