c102032f by chiangbt

update1

1 parent 8aced3b1
...@@ -121,4 +121,7 @@ ...@@ -121,4 +121,7 @@
121 </item> 121 </item>
122 </group> 122 </group>
123 </component> 123 </component>
124 <component name="uidesigner-configuration">
125 <option name="DEFAULT_LAYOUT_MANAGER" value="CardLayout" />
126 </component>
124 </project> 127 </project>
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -2,12 +2,14 @@ ...@@ -2,12 +2,14 @@
2 <project version="4"> 2 <project version="4">
3 <component name="ChangeListManager"> 3 <component name="ChangeListManager">
4 <list default="true" id="5b5a29d8-78e9-4a9f-a415-1e11442b5ca7" name="Default" comment=""> 4 <list default="true" id="5b5a29d8-78e9-4a9f-a415-1e11442b5ca7" name="Default" comment="">
5 <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/lib/sqlite-jdbc-3.21.0-2.jar" />
6 <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/libraries/sqlite_jdbc_3_21_0_2.xml" />
7 <change type="DELETED" beforePath="$PROJECT_DIR$/my.db" afterPath="" /> 5 <change type="DELETED" beforePath="$PROJECT_DIR$/my.db" afterPath="" />
6 <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/TiandituDownloader/Main.class" afterPath="$PROJECT_DIR$/out/production/TiandituDownloader/Main.class" />
7 <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/TiandituDownloader/TiandituDownload.class" afterPath="$PROJECT_DIR$/out/production/TiandituDownloader/TiandituDownload.class" />
8 <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/uiDesigner.xml" afterPath="$PROJECT_DIR$/.idea/uiDesigner.xml" />
8 <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" /> 9 <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
9 <change type="MODIFICATION" beforePath="$PROJECT_DIR$/TiandituDownloader.iml" afterPath="$PROJECT_DIR$/TiandituDownloader.iml" /> 10 <change type="MODIFICATION" beforePath="$PROJECT_DIR$/readme.md" afterPath="$PROJECT_DIR$/readme.md" />
10 <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Main.java" afterPath="$PROJECT_DIR$/src/Main.java" /> 11 <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/Main.java" afterPath="$PROJECT_DIR$/src/Main.java" />
12 <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/TiandituDownload.java" afterPath="$PROJECT_DIR$/src/TiandituDownload.java" />
11 </list> 13 </list>
12 <ignored path="$PROJECT_DIR$/out/" /> 14 <ignored path="$PROJECT_DIR$/out/" />
13 <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> 15 <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
...@@ -19,11 +21,11 @@ ...@@ -19,11 +21,11 @@
19 </component> 21 </component>
20 <component name="FileEditorManager"> 22 <component name="FileEditorManager">
21 <leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> 23 <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
22 <file leaf-file-name="Main.java" pinned="false" current-in-tab="true"> 24 <file leaf-file-name="Main.java" pinned="false" current-in-tab="false">
23 <entry file="file://$PROJECT_DIR$/src/Main.java"> 25 <entry file="file://$PROJECT_DIR$/src/Main.java">
24 <provider selected="true" editor-type-id="text-editor"> 26 <provider selected="true" editor-type-id="text-editor">
25 <state relative-caret-position="225"> 27 <state relative-caret-position="210">
26 <caret line="15" column="47" lean-forward="false" selection-start-line="15" selection-start-column="47" selection-end-line="15" selection-end-column="47" /> 28 <caret line="14" column="87" lean-forward="false" selection-start-line="14" selection-start-column="87" selection-end-line="14" selection-end-column="87" />
27 <folding> 29 <folding>
28 <element signature="imports" expanded="true" /> 30 <element signature="imports" expanded="true" />
29 </folding> 31 </folding>
...@@ -31,18 +33,31 @@ ...@@ -31,18 +33,31 @@
31 </provider> 33 </provider>
32 </entry> 34 </entry>
33 </file> 35 </file>
36 <file leaf-file-name="readme.md" pinned="false" current-in-tab="true">
37 <entry file="file://$PROJECT_DIR$/readme.md">
38 <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
39 <state split_layout="SPLIT">
40 <first_editor relative-caret-position="210">
41 <caret line="14" column="44" lean-forward="false" selection-start-line="14" selection-start-column="44" selection-end-line="14" selection-end-column="44" />
42 <folding />
43 </first_editor>
44 <second_editor />
45 </state>
46 </provider>
47 </entry>
48 </file>
34 <file leaf-file-name="TiandituDownload.java" pinned="false" current-in-tab="false"> 49 <file leaf-file-name="TiandituDownload.java" pinned="false" current-in-tab="false">
35 <entry file="file://$PROJECT_DIR$/src/TiandituDownload.java"> 50 <entry file="file://$PROJECT_DIR$/src/TiandituDownload.java">
36 <provider selected="true" editor-type-id="text-editor"> 51 <provider selected="true" editor-type-id="text-editor">
37 <state relative-caret-position="71"> 52 <state relative-caret-position="190">
38 <caret line="127" column="9" lean-forward="true" selection-start-line="127" selection-start-column="9" selection-end-line="127" selection-end-column="9" /> 53 <caret line="114" column="60" lean-forward="true" selection-start-line="114" selection-start-column="60" selection-end-line="114" selection-end-column="60" />
39 <folding> 54 <folding>
40 <element signature="imports" expanded="true" /> 55 <element signature="imports" expanded="true" />
41 <element signature="method#calculateEnv#0;class#TiandituDownload#0" expanded="false" /> 56 <element signature="method#calculateEnv#0;class#TiandituDownload#0" expanded="false" />
42 <element signature="method#getTile#0;class#TiandituDownload#0" expanded="false" /> 57 <element signature="method#getTile#0;class#TiandituDownload#0" expanded="false" />
43 <marker date="1522037759498" expanded="true" signature="2957:3054" ph="select * fro... missingValue" /> 58 <marker date="1522048729940" expanded="true" signature="3123:3220" ph="select * fro... missingValue" />
44 <marker date="1522037759498" expanded="true" signature="3632:3708" ph="INSERT INTO missingValue... " /> 59 <marker date="1522048729940" expanded="true" signature="5353:5429" ph="INSERT INTO missingValue... " />
45 <marker date="1522037759498" expanded="true" signature="4814:5001" ph="CREATE TABLE... IF" /> 60 <marker date="1522048729940" expanded="true" signature="6550:6737" ph="CREATE TABLE... IF" />
46 </folding> 61 </folding>
47 </state> 62 </state>
48 </provider> 63 </provider>
...@@ -102,15 +117,17 @@ ...@@ -102,15 +117,17 @@
102 <list> 117 <list>
103 <option value="$PROJECT_DIR$/src/Point.java" /> 118 <option value="$PROJECT_DIR$/src/Point.java" />
104 <option value="$PROJECT_DIR$/src/CalEnv.java" /> 119 <option value="$PROJECT_DIR$/src/CalEnv.java" />
105 <option value="$PROJECT_DIR$/src/TiandituDownload.java" />
106 <option value="$PROJECT_DIR$/src/utils/CalEnv.java" /> 120 <option value="$PROJECT_DIR$/src/utils/CalEnv.java" />
107 <option value="$PROJECT_DIR$/src/utils/Point.java" /> 121 <option value="$PROJECT_DIR$/src/utils/Point.java" />
108 <option value="$PROJECT_DIR$/src/TianDiTuTiledMapServiceType.java" /> 122 <option value="$PROJECT_DIR$/src/TianDiTuTiledMapServiceType.java" />
109 <option value="$PROJECT_DIR$/src/TDTUrl.java" /> 123 <option value="$PROJECT_DIR$/src/TDTUrl.java" />
110 <option value="$PROJECT_DIR$/src/utils/TianDiTuTiledMapServiceType.java" /> 124 <option value="$PROJECT_DIR$/src/utils/TianDiTuTiledMapServiceType.java" />
111 <option value="$PROJECT_DIR$/src/utils/TDTUrl.java" /> 125 <option value="$PROJECT_DIR$/src/utils/TDTUrl.java" />
112 <option value="$PROJECT_DIR$/readme.md" /> 126 <option value="$PROJECT_DIR$/src/MainForm.java" />
127 <option value="$PROJECT_DIR$/src/MainForm.form" />
113 <option value="$PROJECT_DIR$/src/Main.java" /> 128 <option value="$PROJECT_DIR$/src/Main.java" />
129 <option value="$PROJECT_DIR$/src/TiandituDownload.java" />
130 <option value="$PROJECT_DIR$/readme.md" />
114 </list> 131 </list>
115 </option> 132 </option>
116 </component> 133 </component>
...@@ -178,6 +195,7 @@ ...@@ -178,6 +195,7 @@
178 <property name="project.structure.last.edited" value="Libraries" /> 195 <property name="project.structure.last.edited" value="Libraries" />
179 <property name="project.structure.proportion" value="0.0" /> 196 <property name="project.structure.proportion" value="0.0" />
180 <property name="project.structure.side.proportion" value="0.2" /> 197 <property name="project.structure.side.proportion" value="0.2" />
198 <property name="UI_DESIGNER_EDITOR_MODE.UIDesignerToolWindowManager.WIDTH" value="233" />
181 </component> 199 </component>
182 <component name="RecentsManager"> 200 <component name="RecentsManager">
183 <key name="MoveFile.RECENT_KEYS"> 201 <key name="MoveFile.RECENT_KEYS">
...@@ -207,7 +225,7 @@ ...@@ -207,7 +225,7 @@
207 <option name="PROGRAM_PARAMETERS" value="" /> 225 <option name="PROGRAM_PARAMETERS" value="" />
208 <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" /> 226 <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
209 <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> 227 <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
210 <option name="ALTERNATIVE_JRE_PATH" value="" /> 228 <option name="ALTERNATIVE_JRE_PATH" />
211 <option name="ENABLE_SWING_INSPECTOR" value="false" /> 229 <option name="ENABLE_SWING_INSPECTOR" value="false" />
212 <option name="ENV_VARIABLES" /> 230 <option name="ENV_VARIABLES" />
213 <option name="PASS_PARENT_ENVS" value="true" /> 231 <option name="PASS_PARENT_ENVS" value="true" />
...@@ -248,12 +266,12 @@ ...@@ -248,12 +266,12 @@
248 <option name="presentableId" value="Default" /> 266 <option name="presentableId" value="Default" />
249 <updated>1522029080525</updated> 267 <updated>1522029080525</updated>
250 <workItem from="1522029083503" duration="8800000" /> 268 <workItem from="1522029083503" duration="8800000" />
251 <workItem from="1522044614927" duration="423000" /> 269 <workItem from="1522044614927" duration="3890000" />
252 </task> 270 </task>
253 <servers /> 271 <servers />
254 </component> 272 </component>
255 <component name="TimeTrackingManager"> 273 <component name="TimeTrackingManager">
256 <option name="totallyTimeSpent" value="9223000" /> 274 <option name="totallyTimeSpent" value="12690000" />
257 </component> 275 </component>
258 <component name="ToolWindowManager"> 276 <component name="ToolWindowManager">
259 <frame x="40" y="23" width="1400" height="771" extended-state="0" /> 277 <frame x="40" y="23" width="1400" height="771" extended-state="0" />
...@@ -267,12 +285,12 @@ ...@@ -267,12 +285,12 @@
267 <window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> 285 <window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
268 <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" /> 286 <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
269 <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> 287 <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
270 <window_info id="Run" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.3831361" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> 288 <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32988167" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
271 <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> 289 <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
272 <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32988167" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> 290 <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32988167" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
273 <window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> 291 <window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
274 <window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> 292 <window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
275 <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.2533137" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> 293 <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.17157584" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
276 <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> 294 <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
277 <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32988167" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> 295 <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32988167" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
278 <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> 296 <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
...@@ -346,9 +364,9 @@ ...@@ -346,9 +364,9 @@
346 <element signature="imports" expanded="true" /> 364 <element signature="imports" expanded="true" />
347 <element signature="method#calculateEnv#0;class#TiandituDownload#0" expanded="false" /> 365 <element signature="method#calculateEnv#0;class#TiandituDownload#0" expanded="false" />
348 <element signature="method#getTile#0;class#TiandituDownload#0" expanded="false" /> 366 <element signature="method#getTile#0;class#TiandituDownload#0" expanded="false" />
349 <marker date="1522037759498" expanded="true" signature="2957:3054" ph="select * fro... missingValue" /> 367 <marker date="1522048729940" expanded="true" signature="3123:3220" ph="select * fro... missingValue" />
350 <marker date="1522037759498" expanded="true" signature="3632:3708" ph="INSERT INTO missingValue... " /> 368 <marker date="1522048729940" expanded="true" signature="5353:5429" ph="INSERT INTO missingValue... " />
351 <marker date="1522037759498" expanded="true" signature="4814:5001" ph="CREATE TABLE... IF" /> 369 <marker date="1522048729940" expanded="true" signature="6550:6737" ph="CREATE TABLE... IF" />
352 </folding> 370 </folding>
353 </state> 371 </state>
354 </provider> 372 </provider>
...@@ -430,42 +448,55 @@ ...@@ -430,42 +448,55 @@
430 </state> 448 </state>
431 </provider> 449 </provider>
432 </entry> 450 </entry>
433 <entry file="file://$PROJECT_DIR$/readme.md"> 451 <entry file="file://$PROJECT_DIR$/src/MainForm.form">
434 <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]"> 452 <provider selected="true" editor-type-id="ui-designer">
435 <state split_layout="SPLIT"> 453 <state />
436 <first_editor relative-caret-position="225"> 454 </provider>
437 <caret line="15" column="3" lean-forward="true" selection-start-line="15" selection-start-column="3" selection-end-line="15" selection-end-column="3" /> 455 </entry>
456 <entry file="file://$PROJECT_DIR$/src/MainForm.java">
457 <provider selected="true" editor-type-id="text-editor">
458 <state relative-caret-position="75">
459 <caret line="5" column="0" lean-forward="true" selection-start-line="5" selection-start-column="0" selection-end-line="5" selection-end-column="0" />
438 <folding /> 460 <folding />
439 </first_editor>
440 <second_editor />
441 </state> 461 </state>
442 </provider> 462 </provider>
443 </entry> 463 </entry>
444 <entry file="file://$PROJECT_DIR$/src/TiandituDownload.java"> 464 <entry file="file://$PROJECT_DIR$/src/Main.java">
445 <provider selected="true" editor-type-id="text-editor"> 465 <provider selected="true" editor-type-id="text-editor">
446 <state relative-caret-position="71"> 466 <state relative-caret-position="210">
447 <caret line="127" column="9" lean-forward="true" selection-start-line="127" selection-start-column="9" selection-end-line="127" selection-end-column="9" /> 467 <caret line="14" column="87" lean-forward="false" selection-start-line="14" selection-start-column="87" selection-end-line="14" selection-end-column="87" />
448 <folding> 468 <folding>
449 <element signature="imports" expanded="true" /> 469 <element signature="imports" expanded="true" />
450 <element signature="method#calculateEnv#0;class#TiandituDownload#0" expanded="false" />
451 <element signature="method#getTile#0;class#TiandituDownload#0" expanded="false" />
452 <marker date="1522037759498" expanded="true" signature="2957:3054" ph="select * fro... missingValue" />
453 <marker date="1522037759498" expanded="true" signature="3632:3708" ph="INSERT INTO missingValue... " />
454 <marker date="1522037759498" expanded="true" signature="4814:5001" ph="CREATE TABLE... IF" />
455 </folding> 470 </folding>
456 </state> 471 </state>
457 </provider> 472 </provider>
458 </entry> 473 </entry>
459 <entry file="file://$PROJECT_DIR$/src/Main.java"> 474 <entry file="file://$PROJECT_DIR$/src/TiandituDownload.java">
460 <provider selected="true" editor-type-id="text-editor"> 475 <provider selected="true" editor-type-id="text-editor">
461 <state relative-caret-position="225"> 476 <state relative-caret-position="190">
462 <caret line="15" column="47" lean-forward="false" selection-start-line="15" selection-start-column="47" selection-end-line="15" selection-end-column="47" /> 477 <caret line="114" column="60" lean-forward="true" selection-start-line="114" selection-start-column="60" selection-end-line="114" selection-end-column="60" />
463 <folding> 478 <folding>
464 <element signature="imports" expanded="true" /> 479 <element signature="imports" expanded="true" />
480 <element signature="method#calculateEnv#0;class#TiandituDownload#0" expanded="false" />
481 <element signature="method#getTile#0;class#TiandituDownload#0" expanded="false" />
482 <marker date="1522048729940" expanded="true" signature="3123:3220" ph="select * fro... missingValue" />
483 <marker date="1522048729940" expanded="true" signature="5353:5429" ph="INSERT INTO missingValue... " />
484 <marker date="1522048729940" expanded="true" signature="6550:6737" ph="CREATE TABLE... IF" />
465 </folding> 485 </folding>
466 </state> 486 </state>
467 </provider> 487 </provider>
468 </entry> 488 </entry>
489 <entry file="file://$PROJECT_DIR$/readme.md">
490 <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
491 <state split_layout="SPLIT">
492 <first_editor relative-caret-position="210">
493 <caret line="14" column="44" lean-forward="false" selection-start-line="14" selection-start-column="44" selection-end-line="14" selection-end-column="44" />
494 <folding />
495 </first_editor>
496 <second_editor />
497 </state>
498 </provider>
499 </entry>
469 </component> 500 </component>
470 <component name="masterDetails"> 501 <component name="masterDetails">
471 <states> 502 <states>
......
No preview for this file type
...@@ -10,7 +10,9 @@ TiandituDownload tiandituDownload = new TiandituDownload("my.db"); ...@@ -10,7 +10,9 @@ TiandituDownload tiandituDownload = new TiandituDownload("my.db");
10 Point pt = new Point(29.76,106.64); 10 Point pt = new Point(29.76,106.64);
11 Point pt2 = new Point(35.33, 108.12); 11 Point pt2 = new Point(35.33, 108.12);
12 // 下载器 12 // 下载器
13 // 2 为最小level,9为最大level, 13 // 2 为最小level,9为最大level
14 tiandituDownload.Download(pt, pt2, 2,9, TianDiTuTiledMapServiceType.IMG_C); 14 // TianDiTuTiledMapServiceType.IMG_C 为下载数据类型
15 // 最后一个参数为merge,为true时,会将地图及其注记一并下载融合到一张图片中去
16 tiandituDownload.Download(pt, pt2, 2,9, TianDiTuTiledMapServiceType.IMG_C, true);
15 17
16 ``` 18 ```
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -3,7 +3,7 @@ import utils.TianDiTuTiledMapServiceType; ...@@ -3,7 +3,7 @@ import utils.TianDiTuTiledMapServiceType;
3 3
4 import java.sql.SQLException; 4 import java.sql.SQLException;
5 5
6 public class Main { 6 public class Main{
7 7
8 8
9 public static void main(String[] args) throws SQLException { 9 public static void main(String[] args) throws SQLException {
...@@ -12,7 +12,6 @@ public class Main { ...@@ -12,7 +12,6 @@ public class Main {
12 TiandituDownload tiandituDownload = new TiandituDownload("my.db"); 12 TiandituDownload tiandituDownload = new TiandituDownload("my.db");
13 Point pt = new Point(29.76,106.64); 13 Point pt = new Point(29.76,106.64);
14 Point pt2 = new Point(35.33, 108.12); 14 Point pt2 = new Point(35.33, 108.12);
15 // tiandituDownload.Download(pt, pt2, 9, utils.TianDiTuTiledMapServiceType.IMG_C); 15 tiandituDownload.Download(pt, pt2, 2,9, TianDiTuTiledMapServiceType.VEC_C, true);
16 tiandituDownload.Download(pt, pt2, 2,11, TianDiTuTiledMapServiceType.IMG_C);
17 } 16 }
18 } 17 }
......
...@@ -3,8 +3,13 @@ import utils.Point; ...@@ -3,8 +3,13 @@ import utils.Point;
3 import utils.TDTUrl; 3 import utils.TDTUrl;
4 import utils.TianDiTuTiledMapServiceType; 4 import utils.TianDiTuTiledMapServiceType;
5 5
6 import javax.imageio.ImageIO;
7 import java.awt.*;
8 import java.awt.image.BufferedImage;
6 import java.io.BufferedInputStream; 9 import java.io.BufferedInputStream;
10 import java.io.ByteArrayInputStream;
7 import java.io.ByteArrayOutputStream; 11 import java.io.ByteArrayOutputStream;
12 import java.io.InputStream;
8 import java.net.HttpURLConnection; 13 import java.net.HttpURLConnection;
9 import java.net.URL; 14 import java.net.URL;
10 import java.sql.*; 15 import java.sql.*;
...@@ -81,7 +86,7 @@ public class TiandituDownload { ...@@ -81,7 +86,7 @@ public class TiandituDownload {
81 return new CalEnv(startX, startY); 86 return new CalEnv(startX, startY);
82 } 87 }
83 88
84 private void Download(Point minPoint, Point maxPoint, int level, TianDiTuTiledMapServiceType type){ 89 private void Download(Point minPoint, Point maxPoint, int level, TianDiTuTiledMapServiceType type, boolean merge){
85 90
86 try{ 91 try{
87 CalEnv startEnv = calculateEnv(minPoint, level); 92 CalEnv startEnv = calculateEnv(minPoint, level);
...@@ -108,6 +113,32 @@ public class TiandituDownload { ...@@ -108,6 +113,32 @@ public class TiandituDownload {
108 // 获得地图瓦片 113 // 获得地图瓦片
109 byte[] img = getTile(url); 114 byte[] img = getTile(url);
110 System.out.println("正在下载 "+url); 115 System.out.println("正在下载 "+url);
116
117 // 如果merge为true,则在下载img_c或vec_c时将其注记图片一并下载
118 if(merge) {
119 InputStream img_stream = new ByteArrayInputStream(img);
120 BufferedImage bImageFromConvert = ImageIO.read(img_stream);
121
122 String url2 = "";
123 if(type == TianDiTuTiledMapServiceType.IMG_C) {
124 url2 = new TDTUrl(level, i, j, TianDiTuTiledMapServiceType.CIA_C).generatUrl();
125 }else{
126 url2 = new TDTUrl(level, i, j, TianDiTuTiledMapServiceType.CVA_C).generatUrl();
127 }
128 byte[] img2 = getTile(url2);
129 InputStream img_stream2 = new ByteArrayInputStream(img2);
130 BufferedImage bImageFromConvert2 = ImageIO.read(img_stream2);
131
132 Graphics g = bImageFromConvert.getGraphics();
133 g.drawImage(bImageFromConvert, 0, 0, null);
134 g.drawImage(bImageFromConvert2, 0, 0, null);
135
136 ByteArrayOutputStream baos = new ByteArrayOutputStream();
137 ImageIO.write(bImageFromConvert, "jpg", baos);
138 baos.flush();
139 img = baos.toByteArray();
140 baos.close();
141 }
111 // 将数据写入sqlite 142 // 将数据写入sqlite
112 String insertSQL = "INSERT INTO "+ type + "(TILELEVEL,TILECOL,TILEROW,TILEDATA) VALUES (?,?,?,?)"; 143 String insertSQL = "INSERT INTO "+ type + "(TILELEVEL,TILECOL,TILEROW,TILEDATA) VALUES (?,?,?,?)";
113 preparedStatement = conn.prepareStatement(insertSQL); 144 preparedStatement = conn.prepareStatement(insertSQL);
...@@ -128,7 +159,7 @@ public class TiandituDownload { ...@@ -128,7 +159,7 @@ public class TiandituDownload {
128 } 159 }
129 } 160 }
130 161
131 public void Download(Point minPoint, Point maxPoint, int minLevel, int maxLevel, TianDiTuTiledMapServiceType type) throws SQLException { 162 public void Download(Point minPoint, Point maxPoint, int minLevel, int maxLevel, TianDiTuTiledMapServiceType type, boolean merge) throws SQLException {
132 try { 163 try {
133 Class.forName("org.sqlite.JDBC"); 164 Class.forName("org.sqlite.JDBC");
134 conn = DriverManager.getConnection("jdbc:sqlite:" + this.dbpath); 165 conn = DriverManager.getConnection("jdbc:sqlite:" + this.dbpath);
...@@ -144,7 +175,7 @@ public class TiandituDownload { ...@@ -144,7 +175,7 @@ public class TiandituDownload {
144 stmt.close(); 175 stmt.close();
145 176
146 for(int m = minLevel; m<= maxLevel; m++){ 177 for(int m = minLevel; m<= maxLevel; m++){
147 this.Download(minPoint, maxPoint, m, type); 178 this.Download(minPoint, maxPoint, m, type, merge);
148 } 179 }
149 conn.close(); 180 conn.close();
150 System.out.println("下载完成"); 181 System.out.println("下载完成");
......