Revisión | 013d878244657c39e4c93c8e91f77e7b7775e124 (tree) |
---|---|
Tiempo | 2013-05-12 09:26:47 |
Autor | yuu hayashi <hayashi.yuu@gmai...> |
Commiter | yuu hayashi |
Merge branch 'master' of git://git.sourceforge.jp/gitroot/gpx2osm/gpx2osm.git
@@ -15,21 +15,45 @@ | ||
15 | 15 | <property name="classes" value="${basedir}/classes" /> |
16 | 16 | <property name="appname" value="gpx2osm"></property> |
17 | 17 | <property name="version" value="${verdate}"></property> |
18 | - | |
18 | + | |
19 | + <target name="classes.dir.check"> | |
20 | + <condition property="classes.dir.exists"> | |
21 | + <available file="${classes}" type="dir"/> | |
22 | + </condition> | |
23 | + </target> | |
24 | + | |
25 | + <target name="src.dir.check"> | |
26 | + <condition property="src.dir.exists"> | |
27 | + <available file="${src}" type="dir"/> | |
28 | + </condition> | |
29 | + </target> | |
30 | + | |
19 | 31 | <!-- |
20 | 32 | [STEP 1] クリーンナップ |
21 | 33 | --> |
22 | - <target name="clean" description="前回作成したclassファイルを削除する"> | |
34 | + <target name="classes.clean" depends="classes.dir.check" if="classes.dir.exists"> | |
23 | 35 | <delete> |
24 | 36 | <fileset dir="${classes}" includes="**/*.class" /> |
37 | + </delete> | |
38 | + </target> | |
39 | + <target name="src.clean" depends="src.dir.check" if="src.dir.exists"> | |
40 | + <delete> | |
25 | 41 | <fileset dir="${src}" includes="**/*.class" /> |
26 | 42 | </delete> |
27 | 43 | </target> |
44 | + | |
45 | + <target name="clean" depends="src.dir.check,classes.dir.check" description="前回作成したclassファイルを削除する"> | |
46 | + <echo>'${classes}' and '${src}' cleaned.</echo> | |
47 | + </target> | |
28 | 48 | |
29 | 49 | <!-- |
30 | 50 | [STEP 2] コンパイル |
31 | 51 | --> |
32 | - <target name="compile_src" depends="clean" description="コンパイル src"> | |
52 | + <target name="mkdir.classes" depends="classes.dir.check" unless="classes.dir.exists"> | |
53 | + <mkdir dir="${classes}" /> | |
54 | + </target> | |
55 | + | |
56 | + <target name="compile_src" depends="clean,mkdir.classes" description="コンパイル src"> | |
33 | 57 | <javac optimize="off" debug="on" verbose="false" srcdir="${src}" destdir="${classes}" encoding="UTF-8" > |
34 | 58 | <include name="**" /> |
35 | 59 | <exclude name="**/*.smap" /> |
@@ -176,11 +176,9 @@ public class Gpx2osm { | ||
176 | 176 | } |
177 | 177 | } |
178 | 178 | |
179 | - if (nameStr.startsWith("Picture")) { | |
180 | - System.out.println("'"+ nameStr +"' : スキップ"); | |
181 | - } | |
182 | - else if (nameStr.startsWith("Voice recording")) { | |
183 | - System.out.println("'"+ nameStr +"' : スキップ"); | |
179 | + if (nameStr.startsWith("Picture") || nameStr.startsWith("写真") | |
180 | + || nameStr.startsWith("Voice recording") || nameStr.startsWith("録音")) { | |
181 | + System.out.println("'"+ nameStr +"'はスキップはスキップしました。"); | |
184 | 182 | } |
185 | 183 | else { |
186 | 184 | System.out.println("name : '"+ nameStr +"'"); |
@@ -213,7 +211,6 @@ public class Gpx2osm { | ||
213 | 211 | nod.setAttribute("timestamp", timeStr); |
214 | 212 | nod.setAttribute("lat", latStr); |
215 | 213 | nod.setAttribute("lon", lonStr); |
216 | - nod.appendChild(getSourceTag(timeStr)); | |
217 | 214 | osmnode.appendChild(nod); |
218 | 215 | |
219 | 216 | // WAYを作成する |
@@ -231,6 +228,7 @@ public class Gpx2osm { | ||
231 | 228 | Element nd = document.createElement("nd"); |
232 | 229 | nd.setAttribute("ref", Integer.toString(iCounter + 1)); |
233 | 230 | way.appendChild(getCopy(nd)); |
231 | + way.appendChild(getSourceTag(timeStr)); | |
234 | 232 | |
235 | 233 | // 回答ノードの内容をWAYに転記する |
236 | 234 | NodeList nlist = onode.getChildNodes(); |
@@ -250,6 +248,7 @@ public class Gpx2osm { | ||
250 | 248 | way = document.createElement("way"); |
251 | 249 | way.setAttribute("id", Integer.toString(iCounter)); |
252 | 250 | way.appendChild(getCopy(nd)); |
251 | + way.appendChild(getSourceTag(timeStr)); | |
253 | 252 | NodeList nlist = onode.getChildNodes(); |
254 | 253 | for (int i=0; i < nlist.getLength(); i++) { |
255 | 254 | way.appendChild(getCopy(nlist.item(i))); |