OSDN Git Service

wayにsourceタグを正しく付加するように訂正しました。(wayではなくweyの終端のnodeにsouceタグが付加されていた)
authorunknown <yu011301@NBJPKA001318.tecan.net>
Sun, 5 May 2013 15:10:45 +0000 (00:10 +0900)
committerunknown <yu011301@NBJPKA001318.tecan.net>
Sun, 5 May 2013 15:10:45 +0000 (00:10 +0900)
gpx2osm/src/osm/jp/osmtracker/tool/Gpx2osm.java

index 1e1e641..e26cf24 100644 (file)
@@ -213,7 +213,6 @@ public class Gpx2osm {
                                        nod.setAttribute("timestamp", timeStr);\r
                                        nod.setAttribute("lat", latStr);\r
                                        nod.setAttribute("lon", lonStr);\r
-                                       nod.appendChild(getSourceTag(timeStr));\r
                                        osmnode.appendChild(nod);\r
 \r
                                        // WAYを作成する\r
@@ -231,6 +230,7 @@ public class Gpx2osm {
                                                        Element nd = document.createElement("nd");\r
                                                        nd.setAttribute("ref", Integer.toString(iCounter + 1));\r
                                                        way.appendChild(getCopy(nd));\r
+                                                       way.appendChild(getSourceTag(timeStr));\r
 \r
                                                        // 回答ノードの内容をWAYに転記する\r
                                                        NodeList nlist = onode.getChildNodes();\r
@@ -250,6 +250,7 @@ public class Gpx2osm {
                                                        way = document.createElement("way");\r
                                                        way.setAttribute("id", Integer.toString(iCounter));\r
                                                        way.appendChild(getCopy(nd));\r
+                                                       way.appendChild(getSourceTag(timeStr));\r
                                                        NodeList nlist = onode.getChildNodes();\r
                                                        for (int i=0; i < nlist.getLength(); i++) {\r
                                                                way.appendChild(getCopy(nlist.item(i)));\r