{"id":1533,"date":"2011-12-05T05:27:13","date_gmt":"2011-12-05T05:27:13","guid":{"rendered":"http:\/\/www.gisdeveloper.co.kr\/?p=1533"},"modified":"2018-12-20T03:49:59","modified_gmt":"2018-12-19T18:49:59","slug":"geoservice-xr-postgis%ec%9c%bc%eb%a1%9c%eb%b6%80%ed%84%b0-geometry-%ec%9d%bd%ea%b8%b0-%ec%98%a4%eb%a5%98-fix","status":"publish","type":"post","link":"http:\/\/www.gisdeveloper.co.kr\/?p=1533","title":{"rendered":"[GIS] GeoService-Xr, PostGIS\uc73c\ub85c\ubd80\ud130 Geometry \uc77d\uae30 \uc624\ub958 Fix"},"content":{"rendered":"<p>GeoService-Xr\uc740 DuraMap-Xr, FingerEyes-Xr, BlackPoint-Xr\uc744 \ud1b5\ud574 \uacf5\uac04 \ub370\uc774\ud130\ub97c \uc11c\ube44\uc2a4\ud558\ub294 \uacf5\uac04 \ub370\uc774\ud130 \uc11c\ubc84\uc785\ub2c8\ub2e4. GeoService-Xr\uc740 ArcSDE, MySQL \uadf8\ub9ac\uace0 PostgreSQL\uc744 \ud1b5\ud574 \uacf5\uac04 \ub370\uc774\ud130\ub97c \uc77d\uace0 \uc4f8 \uc218 \uc788\uc2b5\ub2c8\ub2e4. <\/p>\n<p>PostgreSQL\uc740 PostGIS\uc744 \ud1b5\ud574 \uacf5\uac04 \ub370\uc774\ud130\ub97c \uc9c8\uc758\ud558\uace0 \uc788\uc73c\uba70 GeoService-Xr \uc5ed\uc2dc PostGIS\ub97c \uc0ac\uc6a9\ud569\ub2c8\ub2e4. \uc774\ub7ec\ud55c PostGIS\uc744 \ud1b5\ud574 \uc9c0\uc624\uba54\ud2b8\ub9ac\ub97c \uc77d\ub294 GeoService-Xr\uc758 \uae30\ub2a5 \uc911 Multi-Polygon\uc5d0 \ub300\ud574 \uc633\ubc14\ub974\uac8c \ub3c4\ud615\uc744 \ud45c\ud604\ud558\uc9c0 \ubabb\ud558\ub294 \ubb38\uc81c\uc810\uc774 \uc788\uc5b4\uc11c \uc774\uc5d0 \ub300\ud55c \ubc84\uadf8\ub97c \ud574\uacb0\ud558\uc600\uc2b5\ub2c8\ub2e4. <\/p>\n<p>\ubc84\uadf8 \ub300\uc0c1\uc774 \ub418\ub294 \ud3f4\ub9ac\uace4\uc740 Ring\uc744 \uc5ec\ub7ec\uac1c \uac00\uc9c0\ub294 \ud3f4\ub9ac\uace4\uc73c\ub85c\uc368.. \uc608\ub97c \ub4e4\uc5b4 \uad6c\uba4d\uc774 \ub6ab\ub9b0 \ud3f4\ub9ac\uace4\uc758 \uacbd\uc6b0\uc785\ub2c8\ub2e4. \uc544\ub798\uc758 \uadf8\ub9bc\uc740 \ubc84\uadf8\uac00 \ud574\uacb0\ub41c \uc0c1\ud0dc\uc5d0\uc11c PostGIS\ub97c \ud1b5\ud574 \uacf5\uac04 \ub370\uc774\ud130\ub97c \uac00\uc838\uc640 FingerEyes\uc5d0\uc11c \ud45c\ucd9c\ud55c \ud654\uba74\uc785\ub2c8\ub2e4. \ud074\ub9ad\ud558\uba74 \uc6d0\ubcf8 \ud06c\uae30\ub85c \ubcfc \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.gisdeveloper.co.kr\/wp-content\/uploads\/1\/1056591573.jpg\" class=\"aligncenter\" width=\"100%\" \/><br \/>\ud574\uacb0\ub41c \ubd80\ubd84\uc5d0 \ub300\ud55c GeoService-Xr\uc758 \uc18c\uc2a4 \ucf54\ub4dc \ubd80\ubd84\uc740 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4. \ubb38\uc81c\uc758 \uadfc\ubcf8\uc801\uc778 \uc6d0\uc778\uc740 PostGIS\uc5d0\uc11c \ud3f4\ub9ac\uace4\uc5d0 \ub300\ud55c Geometry Type\uc5d0 \ub300\ud55c \uc81c \uc2a4\uc2a4\ub85c\uc5d0 \ub300\ud55c \uc774\ud574 \ubd80\uc871\uc785\ub2c8\ub2e4. \ud639&#8230; PostGIS\ub97c \ud1b5\ud574 \uacf5\uac04 \ub370\uc774\ud130\ub97c \ucffc\ub9ac\ud558\uace0 \uacb0\uacfc\ub97c \ubc1b\uc544 \uc88c\ud45c\ub97c \ubf51\uc544 \ub0bc\ub54c \uc544\ub798\uc758 \ucf54\ub4dc\uac00 \uc870\uae08\uc774\ub098\ub9c8 \ub3c4\uc6c0\uc774 \ub418\uc2dc\uae38 \ubc14\ub78d\ub2c8\ub2e4.<\/p>\n<pre>} else if(geometryType_ == Geometry.MULTIPOLYGON) {\r\n    while(row.next()) {\r\n        PGgeometry geom = (PGgeometry)row.getObject(shapeFieldIndex);\r\n        ComposedGeom shp = (ComposedGeom)geom.getGeometry();\r\n        \r\n        \/\/ \uba40\ud2f0\ud3f4\ub9ac\uace4\uc744 \uad6c\uc131\ud558\ub294 Ring\uc758 \uac1c\uc218 \uad6c\ud558\uae30  \r\n        short cntPart = 0; \/\/ Ring\uc758 \uac1c\uc218!\r\n        int cntGeoms = shp.numGeoms();\r\n        for(int iGeom=0; iGeom        Polygon polygon = (Polygon)shp.getSubGeometry(iGeom);\r\n            cntPart += polygon.numRings();\r\n        }\r\n  \r\n        \/\/ \uac01 Ring\uc744 \uad6c\uc131\ud558\ub294 \uc815\uc810(Vertex) \uad6c\ud558\uae30\r\n        for(int iGeom=0; iGeom            Polygon polygon = (Polygon)shp.getSubGeometry(iGeom);\r\n            int numRings = polygon.numRings();\r\n            for(int iRing=0; iRing                LinearRing ring = polygon.getRing(iRing);\r\n                int numPts = ring.numPoints();\r\n                for(int iPt=0; iPt                    Point vtx = ring.getPoint(iPt); \/\/ \uc815\uc810!\r\n                }\r\n            }\r\n        }\r\n    }\r\n}<\/pre>\n<p>\uc8fc\uc758 \ud560\uc810\uc740 \uba40\ud2f0\ud3f4\ub9ac\uace4\uc740 Polygon\uc73c\ub85c \uad6c\uc131\ub418\uba70 Polygon\uc740 \ub2e4\uc2dc LinearRing\uc73c\ub85c \uad6c\uc131\ub41c\ub2e4\ub294 \uc810\uc785\ub2c8\ub2e4. Polygon\uc774 \ub2e4\uc2dc LinearRing\uc73c\ub85c \uad6c\uc131\ub418\ub294 \uc774\uc720\ub294 \uad6c\uba4d\uc774 \ub6ab\ub9b0 \ud3f4\ub9ac\uace4 \ub4f1\uc744 \ub098\ud0c0\ub0b4\uae30 \uc704\ud568\uc785\ub2c8\ub2e4.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>GeoService-Xr\uc740 DuraMap-Xr, FingerEyes-Xr, BlackPoint-Xr\uc744 \ud1b5\ud574 \uacf5\uac04 \ub370\uc774\ud130\ub97c \uc11c\ube44\uc2a4\ud558\ub294 \uacf5\uac04 \ub370\uc774\ud130 \uc11c\ubc84\uc785\ub2c8\ub2e4. GeoService-Xr\uc740 ArcSDE, MySQL \uadf8\ub9ac\uace0 PostgreSQL\uc744 \ud1b5\ud574 \uacf5\uac04 \ub370\uc774\ud130\ub97c \uc77d\uace0 \uc4f8 \uc218 \uc788\uc2b5\ub2c8\ub2e4. PostgreSQL\uc740 PostGIS\uc744 \ud1b5\ud574 \uacf5\uac04 \ub370\uc774\ud130\ub97c \uc9c8\uc758\ud558\uace0 \uc788\uc73c\uba70 GeoService-Xr \uc5ed\uc2dc PostGIS\ub97c \uc0ac\uc6a9\ud569\ub2c8\ub2e4. \uc774\ub7ec\ud55c PostGIS\uc744 \ud1b5\ud574 \uc9c0\uc624\uba54\ud2b8\ub9ac\ub97c \uc77d\ub294 GeoService-Xr\uc758 \uae30\ub2a5 \uc911 Multi-Polygon\uc5d0 \ub300\ud574 \uc633\ubc14\ub974\uac8c \ub3c4\ud615\uc744 \ud45c\ud604\ud558\uc9c0 \ubabb\ud558\ub294 \ubb38\uc81c\uc810\uc774 \uc788\uc5b4\uc11c \uc774\uc5d0 \ub300\ud55c \ubc84\uadf8\ub97c \ud574\uacb0\ud558\uc600\uc2b5\ub2c8\ub2e4. \ubc84\uadf8 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/www.gisdeveloper.co.kr\/?p=1533\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;[GIS] GeoService-Xr, PostGIS\uc73c\ub85c\ubd80\ud130 Geometry \uc77d\uae30 \uc624\ub958 Fix&#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":[80,5],"class_list":["post-1533","post","type-post","status-publish","format-standard","hentry","category-gisdev","tag-geoservice-xr","tag-gis"],"_links":{"self":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/1533","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=1533"}],"version-history":[{"count":2,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/1533\/revisions"}],"predecessor-version":[{"id":3128,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/1533\/revisions\/3128"}],"wp:attachment":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1533"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1533"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1533"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}