2d4330ad by chiangbt

first commit

0 parents
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project version="4">
3 <component name="CompilerConfiguration">
4 <option name="DEFAULT_COMPILER" value="Javac" />
5 <resourceExtensions />
6 <wildcardResourcePatterns>
7 <entry name="!?*.java" />
8 <entry name="!?*.form" />
9 <entry name="!?*.class" />
10 <entry name="!?*.groovy" />
11 <entry name="!?*.scala" />
12 <entry name="!?*.flex" />
13 <entry name="!?*.kt" />
14 <entry name="!?*.clj" />
15 </wildcardResourcePatterns>
16 <annotationProcessing>
17 <profile default="true" name="Default" enabled="false">
18 <processorPath useClasspath="true" />
19 </profile>
20 </annotationProcessing>
21 </component>
22 </project>
23
1 <html>Simple <b>Java</b> application that includes a class with <code>main()</code> method</html>
...\ No newline at end of file ...\ No newline at end of file
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project version="4">
3 <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
4 </project>
5
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project version="4">
3 <component name="EntryPointsManager">
4 <entry_points version="2.0" />
5 </component>
6 <component name="ProjectKey">
7 <option name="state" value="project://63537948-39a4-48a0-9c97-34259a0fa913" />
8 </component>
9 <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
10 <output url="file://$PROJECT_DIR$/out" />
11 </component>
12 </project>
...\ No newline at end of file ...\ No newline at end of file
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project version="4">
3 <component name="ProjectModuleManager">
4 <modules>
5 <module fileurl="file://$PROJECT_DIR$/TiandituDownloader.iml" filepath="$PROJECT_DIR$/TiandituDownloader.iml" />
6 </modules>
7 </component>
8 </project>
...\ No newline at end of file ...\ No newline at end of file
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project version="4">
3 <component name="VcsDirectoryMappings">
4 <mapping directory="" vcs="" />
5 </component>
6 </project>
7
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project version="4">
3 <component name="ChangeListManager">
4 <list default="true" id="5b5a29d8-78e9-4a9f-a415-1e11442b5ca7" name="Default" comment="" />
5 <ignored path="$PROJECT_DIR$/out/" />
6 <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
7 <option name="TRACKING_ENABLED" value="true" />
8 <option name="SHOW_DIALOG" value="false" />
9 <option name="HIGHLIGHT_CONFLICTS" value="true" />
10 <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
11 <option name="LAST_RESOLUTION" value="IGNORE" />
12 </component>
13 <component name="FileEditorManager">
14 <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
15 <file leaf-file-name="Main.java" pinned="false" current-in-tab="true">
16 <entry file="file://$PROJECT_DIR$/src/Main.java">
17 <provider selected="true" editor-type-id="text-editor">
18 <state relative-caret-position="180">
19 <caret line="12" column="33" lean-forward="false" selection-start-line="12" selection-start-column="33" selection-end-line="12" selection-end-column="33" />
20 <folding />
21 </state>
22 </provider>
23 </entry>
24 </file>
25 <file leaf-file-name="TiandituDownload.java" pinned="false" current-in-tab="false">
26 <entry file="file://$PROJECT_DIR$/src/TiandituDownload.java">
27 <provider selected="true" editor-type-id="text-editor">
28 <state relative-caret-position="1860">
29 <caret line="131" column="20" lean-forward="false" selection-start-line="131" selection-start-column="20" selection-end-line="131" selection-end-column="20" />
30 <folding>
31 <element signature="imports" expanded="true" />
32 <element signature="e#1671#1672#0" expanded="true" />
33 <element signature="e#1706#1707#0" expanded="true" />
34 <element signature="method#calculateEnv#0;class#TiandituDownload#0" expanded="false" />
35 <element signature="method#getTile#0;class#TiandituDownload#0" expanded="false" />
36 <marker date="1522037120703" expanded="true" signature="2852:2949" ph="select * fro... missingValue" />
37 <marker date="1522037120703" expanded="true" signature="3527:3603" ph="INSERT INTO missingValue... " />
38 <marker date="1522037120703" expanded="true" signature="4709:4896" ph="CREATE TABLE... IF" />
39 </folding>
40 </state>
41 </provider>
42 </entry>
43 </file>
44 <file leaf-file-name="TDTUrl.java" pinned="false" current-in-tab="false">
45 <entry file="file://$PROJECT_DIR$/src/TDTUrl.java">
46 <provider selected="true" editor-type-id="text-editor">
47 <state relative-caret-position="210">
48 <caret line="14" column="28" lean-forward="false" selection-start-line="14" selection-start-column="28" selection-end-line="14" selection-end-column="28" />
49 <folding />
50 </state>
51 </provider>
52 </entry>
53 </file>
54 </leaf>
55 </component>
56 <component name="FileTemplateManagerImpl">
57 <option name="RECENT_TEMPLATES">
58 <list>
59 <option value="Class" />
60 </list>
61 </option>
62 </component>
63 <component name="GradleLocalSettings">
64 <option name="externalProjectsViewState">
65 <projects_view />
66 </option>
67 </component>
68 <component name="IdeDocumentHistory">
69 <option name="CHANGED_PATHS">
70 <list>
71 <option value="$PROJECT_DIR$/src/Point.java" />
72 <option value="$PROJECT_DIR$/src/CalEnv.java" />
73 <option value="$PROJECT_DIR$/src/TDTUrl.java" />
74 <option value="$PROJECT_DIR$/src/TianDiTuTiledMapServiceType.java" />
75 <option value="$PROJECT_DIR$/src/Main.java" />
76 <option value="$PROJECT_DIR$/src/TiandituDownload.java" />
77 </list>
78 </option>
79 </component>
80 <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
81 <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
82 <component name="JsGulpfileManager">
83 <detection-done>true</detection-done>
84 <sorting>DEFINITION_ORDER</sorting>
85 </component>
86 <component name="ProjectFrameBounds">
87 <option name="x" value="387" />
88 <option name="y" value="23" />
89 <option name="width" value="1400" />
90 <option name="height" value="771" />
91 </component>
92 <component name="ProjectView">
93 <navigator currentView="ProjectPane" proportions="" version="1">
94 <flattenPackages />
95 <showMembers />
96 <showModules />
97 <showLibraryContents />
98 <hideEmptyPackages />
99 <abbreviatePackageNames />
100 <autoscrollToSource />
101 <autoscrollFromSource />
102 <sortByType />
103 <manualOrder />
104 <foldersAlwaysOnTop value="true" />
105 </navigator>
106 <panes>
107 <pane id="ProjectPane">
108 <subPane>
109 <expand>
110 <path>
111 <item name="TiandituDownloader" type="b2602c69:ProjectViewProjectNode" />
112 <item name="TiandituDownloader" type="462c0819:PsiDirectoryNode" />
113 </path>
114 <path>
115 <item name="TiandituDownloader" type="b2602c69:ProjectViewProjectNode" />
116 <item name="TiandituDownloader" type="462c0819:PsiDirectoryNode" />
117 <item name="src" type="462c0819:PsiDirectoryNode" />
118 </path>
119 </expand>
120 <select />
121 </subPane>
122 </pane>
123 <pane id="AndroidView" />
124 <pane id="Scope" />
125 <pane id="Scratches" />
126 <pane id="PackagesPane" />
127 </panes>
128 </component>
129 <component name="PropertiesComponent">
130 <property name="WebServerToolWindowFactoryState" value="false" />
131 <property name="aspect.path.notification.shown" value="true" />
132 <property name="settings.editor.selected.configurable" value="preferences.lookFeel" />
133 <property name="Downloaded.Files.Path.Enabled" value="false" />
134 <property name="Repository.Attach.JavaDocs" value="false" />
135 <property name="Repository.Attach.Sources" value="false" />
136 <property name="project.structure.last.edited" value="Modules" />
137 <property name="project.structure.proportion" value="0.0" />
138 <property name="project.structure.side.proportion" value="0.2" />
139 </component>
140 <component name="RecentsManager">
141 <key name="CopyFile.RECENT_KEYS">
142 <recent name="$PROJECT_DIR$/src" />
143 </key>
144 </component>
145 <component name="RunDashboard">
146 <option name="ruleStates">
147 <list>
148 <RuleState>
149 <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
150 </RuleState>
151 <RuleState>
152 <option name="name" value="StatusDashboardGroupingRule" />
153 </RuleState>
154 </list>
155 </option>
156 </component>
157 <component name="RunManager" selected="Application.Main">
158 <configuration name="Main" type="Application" factoryName="Application" temporary="true">
159 <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
160 <option name="MAIN_CLASS_NAME" value="Main" />
161 <option name="VM_PARAMETERS" value="" />
162 <option name="PROGRAM_PARAMETERS" value="" />
163 <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
164 <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
165 <option name="ALTERNATIVE_JRE_PATH" value="" />
166 <option name="ENABLE_SWING_INSPECTOR" value="false" />
167 <option name="ENV_VARIABLES" />
168 <option name="PASS_PARENT_ENVS" value="true" />
169 <module name="TiandituDownloader" />
170 <envs />
171 <RunnerSettings RunnerId="Run" />
172 <ConfigurationWrapper RunnerId="Run" />
173 </configuration>
174 <configuration default="true" type="Application" factoryName="Application">
175 <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
176 <option name="MAIN_CLASS_NAME" />
177 <option name="VM_PARAMETERS" />
178 <option name="PROGRAM_PARAMETERS" />
179 <option name="WORKING_DIRECTORY" />
180 <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
181 <option name="ALTERNATIVE_JRE_PATH" />
182 <option name="ENABLE_SWING_INSPECTOR" value="false" />
183 <option name="ENV_VARIABLES" />
184 <option name="PASS_PARENT_ENVS" value="true" />
185 <module name="" />
186 <envs />
187 <method />
188 </configuration>
189 <recent_temporary>
190 <list size="1">
191 <item index="0" class="java.lang.String" itemvalue="Application.Main" />
192 </list>
193 </recent_temporary>
194 </component>
195 <component name="ShelveChangesManager" show_recycled="false">
196 <option name="remove_strategy" value="false" />
197 </component>
198 <component name="TaskManager">
199 <task active="true" id="Default" summary="Default task">
200 <changelist id="5b5a29d8-78e9-4a9f-a415-1e11442b5ca7" name="Default" comment="" />
201 <created>1522029080525</created>
202 <option name="number" value="Default" />
203 <option name="presentableId" value="Default" />
204 <updated>1522029080525</updated>
205 <workItem from="1522029083503" duration="8020000" />
206 </task>
207 <servers />
208 </component>
209 <component name="TimeTrackingManager">
210 <option name="totallyTimeSpent" value="8020000" />
211 </component>
212 <component name="ToolWindowManager">
213 <frame x="387" y="23" width="1400" height="771" extended-state="0" />
214 <layout>
215 <window_info id="Palette" 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="-1" side_tool="false" content_ui="tabs" />
216 <window_info id="TODO" 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="6" side_tool="false" content_ui="tabs" />
217 <window_info id="Messages" 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" />
218 <window_info id="Palette&#9;" 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="-1" side_tool="false" content_ui="tabs" />
219 <window_info id="Image Layers" 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="-1" side_tool="false" content_ui="tabs" />
220 <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="-1" side_tool="false" content_ui="tabs" />
221 <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="-1" side_tool="true" content_ui="tabs" />
222 <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="-1" side_tool="false" content_ui="tabs" />
223 <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.12130178" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
224 <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
225 <window_info id="Terminal" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32988167" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
226 <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="-1" side_tool="false" content_ui="tabs" />
227 <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="-1" side_tool="false" content_ui="tabs" />
228 <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.2496318" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
229 <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="-1" side_tool="false" content_ui="tabs" />
230 <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" />
231 <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" />
232 <window_info id="Ant Build" active="false" anchor="right" 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" />
233 <window_info id="UI 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="-1" side_tool="false" content_ui="tabs" />
234 <window_info id="Theme Preview" 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="-1" side_tool="false" content_ui="tabs" />
235 <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
236 <window_info id="Favorites" 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="-1" side_tool="true" content_ui="tabs" />
237 <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
238 <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
239 <window_info id="Message" 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="0" side_tool="false" content_ui="tabs" />
240 <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
241 <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
242 </layout>
243 </component>
244 <component name="TypeScriptGeneratedFilesManager">
245 <option name="version" value="1" />
246 </component>
247 <component name="VcsContentAnnotationSettings">
248 <option name="myLimit" value="2678400000" />
249 </component>
250 <component name="XDebuggerManager">
251 <breakpoint-manager />
252 <watches-manager />
253 </component>
254 <component name="editorHistoryManager">
255 <entry file="file://$PROJECT_DIR$/src/Point.java">
256 <provider selected="true" editor-type-id="text-editor">
257 <state relative-caret-position="165">
258 <caret line="11" column="23" lean-forward="true" selection-start-line="11" selection-start-column="23" selection-end-line="11" selection-end-column="23" />
259 <folding>
260 <element signature="e#224#225#0" expanded="true" />
261 <element signature="e#250#251#0" expanded="true" />
262 <element signature="e#288#289#0" expanded="true" />
263 <element signature="e#318#319#0" expanded="true" />
264 <element signature="e#348#349#0" expanded="true" />
265 <element signature="e#374#375#0" expanded="true" />
266 <element signature="e#412#413#0" expanded="true" />
267 <element signature="e#442#443#0" expanded="true" />
268 </folding>
269 </state>
270 </provider>
271 </entry>
272 <entry file="file://$PROJECT_DIR$/src/CalEnv.java">
273 <provider selected="true" editor-type-id="text-editor">
274 <state relative-caret-position="180">
275 <caret line="12" column="22" lean-forward="true" selection-start-line="12" selection-start-column="22" selection-end-line="12" selection-end-column="22" />
276 <folding>
277 <element signature="e#211#212#0" expanded="true" />
278 <element signature="e#240#241#0" expanded="true" />
279 <element signature="e#281#282#0" expanded="true" />
280 <element signature="e#317#318#0" expanded="true" />
281 <element signature="e#347#348#0" expanded="true" />
282 <element signature="e#376#377#0" expanded="true" />
283 <element signature="e#417#418#0" expanded="true" />
284 <element signature="e#453#454#0" expanded="true" />
285 </folding>
286 </state>
287 </provider>
288 </entry>
289 <entry file="file://$PROJECT_DIR$/src/TianDiTuTiledMapServiceType.java">
290 <provider selected="true" editor-type-id="text-editor">
291 <state relative-caret-position="0">
292 <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
293 <folding />
294 </state>
295 </provider>
296 </entry>
297 <entry file="file://$PROJECT_DIR$/src/TDTUrl.java">
298 <provider selected="true" editor-type-id="text-editor">
299 <state relative-caret-position="210">
300 <caret line="14" column="28" lean-forward="false" selection-start-line="14" selection-start-column="28" selection-end-line="14" selection-end-column="28" />
301 <folding />
302 </state>
303 </provider>
304 </entry>
305 <entry file="file://$PROJECT_DIR$/TiandituDownloader.iml">
306 <provider selected="true" editor-type-id="text-editor">
307 <state relative-caret-position="0">
308 <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
309 <folding />
310 </state>
311 </provider>
312 </entry>
313 <entry file="file://$PROJECT_DIR$/src/TiandituDownload.java">
314 <provider selected="true" editor-type-id="text-editor">
315 <state relative-caret-position="1860">
316 <caret line="131" column="20" lean-forward="false" selection-start-line="131" selection-start-column="20" selection-end-line="131" selection-end-column="20" />
317 <folding>
318 <element signature="imports" expanded="true" />
319 <element signature="e#1671#1672#0" expanded="true" />
320 <element signature="e#1706#1707#0" expanded="true" />
321 <element signature="method#calculateEnv#0;class#TiandituDownload#0" expanded="false" />
322 <element signature="method#getTile#0;class#TiandituDownload#0" expanded="false" />
323 <marker date="1522037120703" expanded="true" signature="2852:2949" ph="select * fro... missingValue" />
324 <marker date="1522037120703" expanded="true" signature="3527:3603" ph="INSERT INTO missingValue... " />
325 <marker date="1522037120703" expanded="true" signature="4709:4896" ph="CREATE TABLE... IF" />
326 </folding>
327 </state>
328 </provider>
329 </entry>
330 <entry file="file://$PROJECT_DIR$/src/Main.java">
331 <provider selected="true" editor-type-id="text-editor">
332 <state relative-caret-position="180">
333 <caret line="12" column="33" lean-forward="false" selection-start-line="12" selection-start-column="33" selection-end-line="12" selection-end-column="33" />
334 <folding />
335 </state>
336 </provider>
337 </entry>
338 </component>
339 <component name="masterDetails">
340 <states>
341 <state key="ArtifactsStructureConfigurable.UI">
342 <settings>
343 <artifact-editor />
344 <splitter-proportions>
345 <option name="proportions">
346 <list>
347 <option value="0.2" />
348 </list>
349 </option>
350 </splitter-proportions>
351 </settings>
352 </state>
353 <state key="FacetStructureConfigurable.UI">
354 <settings>
355 <last-edited>No facets are configured</last-edited>
356 <splitter-proportions>
357 <option name="proportions">
358 <list>
359 <option value="0.2" />
360 </list>
361 </option>
362 </splitter-proportions>
363 </settings>
364 </state>
365 <state key="GlobalLibrariesConfigurable.UI">
366 <settings>
367 <splitter-proportions>
368 <option name="proportions">
369 <list>
370 <option value="0.2" />
371 </list>
372 </option>
373 </splitter-proportions>
374 </settings>
375 </state>
376 <state key="JdkListConfigurable.UI">
377 <settings>
378 <last-edited>1.8</last-edited>
379 <splitter-proportions>
380 <option name="proportions">
381 <list>
382 <option value="0.2" />
383 </list>
384 </option>
385 </splitter-proportions>
386 </settings>
387 </state>
388 <state key="ModuleStructureConfigurable.UI">
389 <settings>
390 <last-edited>TiandituDownloader</last-edited>
391 <splitter-proportions>
392 <option name="proportions">
393 <list>
394 <option value="0.2" />
395 </list>
396 </option>
397 </splitter-proportions>
398 </settings>
399 </state>
400 <state key="ProjectLibrariesConfigurable.UI">
401 <settings>
402 <splitter-proportions>
403 <option name="proportions">
404 <list>
405 <option value="0.2" />
406 </list>
407 </option>
408 </splitter-proportions>
409 </settings>
410 </state>
411 </states>
412 </component>
413 </project>
...\ No newline at end of file ...\ No newline at end of file
1 <?xml version="1.0" encoding="UTF-8"?>
2 <module type="JAVA_MODULE" version="4">
3 <component name="NewModuleRootManager" inherit-compiler-output="true">
4 <exclude-output />
5 <content url="file://$MODULE_DIR$">
6 <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
7 </content>
8 <orderEntry type="inheritedJdk" />
9 <orderEntry type="sourceFolder" forTests="false" />
10 <orderEntry type="module-library">
11 <library>
12 <CLASSES>
13 <root url="jar://$USER_HOME$/Downloads/sqlite-jdbc-3.21.0-2.jar!/" />
14 </CLASSES>
15 <JAVADOC />
16 <SOURCES />
17 </library>
18 </orderEntry>
19 </component>
20 </module>
...\ No newline at end of file ...\ No newline at end of file
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
1 public class CalEnv {
2
3 private int startX;
4
5 private int startY;
6
7 public CalEnv(int startX, int startY) {
8 this.startX = startX;
9 this.startY = startY;
10 }
11
12 public int getStartX() {
13 return startX;
14 }
15
16 public void setStartX(int startX) {
17 this.startX = startX;
18 }
19
20 public int getStartY() {
21 return startY;
22 }
23
24 public void setStartY(int startY) {
25 this.startY = startY;
26 }
27 }
1 import java.sql.SQLException;
2
3 public class Main {
4
5
6 public static void main(String[] args) throws SQLException {
7 System.out.println("Hello World!");
8
9 TiandituDownload tiandituDownload = new TiandituDownload("my.db");
10 Point pt = new Point(29.76,106.64);
11 Point pt2 = new Point(35.33, 108.12);
12 // tiandituDownload.Download(pt, pt2, 9, TianDiTuTiledMapServiceType.IMG_C);
13 tiandituDownload.Download(pt, pt2, 2,9, TianDiTuTiledMapServiceType.IMG_C);
14 }
15 }
1 public class Point {
2
3 private double lat;
4
5 private double lng;
6
7 public Point(){
8
9 }
10
11 public Point(double lat, double lng){
12 this.lat = lat;
13 this.lng = lng;
14 }
15
16 public double getLat() {
17 return lat;
18 }
19
20 public void setLat(double lat) {
21 this.lat = lat;
22 }
23
24 public double getLng() {
25 return lng;
26 }
27
28 public void setLng(double lng) {
29 this.lng = lng;
30 }
31
32 }
1 import java.util.Random;
2
3 /**
4 * Created by jiangbotao on 2018/3/23.
5 */
6
7 public class TDTUrl {
8
9 private TianDiTuTiledMapServiceType _tiandituMapServiceType;
10 private int _level;
11 private int _col;
12 private int _row;
13
14 public TDTUrl(int level, int col, int row, TianDiTuTiledMapServiceType tiandituMapServiceType) {
15 this._level = level;
16 this._col = col;
17 this._row = row;
18 this._tiandituMapServiceType = tiandituMapServiceType;
19 }
20
21 public String generatUrl() {
22
23 StringBuilder url = new StringBuilder("http://t");
24 Random random = new Random();
25 int subdomain = (random.nextInt(6) + 1);
26 url.append(subdomain);
27 switch (this._tiandituMapServiceType) {
28 case VEC_C:
29 url.append(".tianditu.com/DataServer?T=vec_c&X=").append(this._col).append("&Y=").append(this._row).append("&L=").append(this._level);
30 break;
31 case CVA_C:
32 url.append(".tianditu.com/DataServer?T=cva_c&X=").append(this._col).append("&Y=").append(this._row).append("&L=").append(this._level);
33 break;
34 case CIA_C:
35 url.append(".tianditu.com/DataServer?T=cia_c&X=").append(this._col).append("&Y=").append(this._row).append("&L=").append(this._level);
36 break;
37 case IMG_C:
38 url.append(".tianditu.com/DataServer?T=img_c&X=").append(this._col).append("&Y=").append(this._row).append("&L=").append(this._level);
39 break;
40 case VEC_W:
41 url.append(".tianditu.com/DataServer?T=vec_w&X=").append(this._col).append("&Y=").append(this._row).append("&L=").append(this._level);
42 break;
43 case CVA_W:
44 url.append(".tianditu.com/DataServer?T=cva_w&X=").append(this._col).append("&Y=").append(this._row).append("&L=").append(this._level);
45 break;
46 case CIA_W:
47 url.append(".tianditu.com/DataServer?T=cia_w&X=").append(this._col).append("&Y=").append(this._row).append("&L=").append(this._level);
48 break;
49 case IMG_W:
50 url.append(".tianditu.com/DataServer?T=img_w&X=").append(this._col).append("&Y=").append(this._row).append("&L=").append(this._level);
51 break;
52 default:
53 return null;
54 }
55 return url.toString();
56 }
57 }
1
2 /**
3 * Created by jiangbotao on 2018/3/23.
4 */
5
6 public enum TianDiTuTiledMapServiceType {
7
8 /**
9 * 矢量数据,CGCS2000
10 * */
11 VEC_C,
12 /**
13 * 影像数据
14 * */
15 IMG_C,
16 /**
17 * 矢量注记
18 * */
19 CVA_C,
20 /**
21 * 影像注记
22 * */
23 CIA_C,
24 /**
25 * 矢量数据,web墨卡托4326
26 */
27 VEC_W,
28 /**
29 * 影像数据
30 * */
31 IMG_W,
32 /**
33 * 矢量注记
34 * */
35 CVA_W,
36 /**
37 * 影像注记
38 * */
39 CIA_W;
40
41 }
1 import java.io.BufferedInputStream;
2 import java.io.ByteArrayOutputStream;
3 import java.net.HttpURLConnection;
4 import java.net.URL;
5 import java.sql.*;
6
7 public class TiandituDownload {
8
9 double[] res = {
10 1.40625,
11 0.703125,
12 0.3515625,
13 0.17578125,
14 0.087890625,
15 0.0439453125,
16 0.02197265625,
17 0.010986328125,
18 0.0054931640625,
19 0.00274658203125,
20 0.001373291015625,
21 0.0006866455078125,
22 0.00034332275390625,
23 0.000171661376953125,
24 8.58306884765629E-05,
25 4.29153442382814E-05,
26 2.14576721191407E-05,
27 1.07288360595703E-05,
28 5.36441802978515E-06,
29 2.68220901489258E-06,
30 1.34110450744629E-06
31 };
32 double[] scale = {
33 400000000,
34 295497598.5708346,
35 147748799.285417,
36 73874399.6427087,
37 36937199.8213544,
38 18468599.9106772,
39 9234299.95533859,
40 4617149.97766929,
41 2308574.98883465,
42 1154287.49441732,
43 577143.747208662,
44 288571.873604331,
45 144285.936802165,
46 72142.9684010827,
47 36071.4842005414,
48 18035.7421002707,
49 9017.87105013534,
50 4508.93552506767,
51 2254.467762533835,
52 1127.2338812669175,
53 563.616940
54 };
55
56 int minLevel = 1;
57 int maxLevel = 2;
58
59 // 保存数据的sqlite文件路径
60 String dbpath;
61
62 Connection conn = null;
63
64 Statement stmt = null;
65
66 public TiandituDownload(String dbpath){
67 this.dbpath =dbpath;
68 }
69
70 private CalEnv calculateEnv(Point originPoint, int level){
71 int startX = (int) Math.floor((originPoint.getLng() + 180)/(256 * res[level]));
72 int startY = (int) Math.floor((90 - originPoint.getLat())/(256 * res[level]));
73 if(startX<0)startX = 0;
74 if(startY<0)startY = 0;
75
76 return new CalEnv(startX, startY);
77 }
78
79 private void Download(Point minPoint, Point maxPoint, int level, TianDiTuTiledMapServiceType type){
80
81 try{
82 CalEnv startEnv = calculateEnv(minPoint, level);
83 CalEnv stopEnv = calculateEnv(maxPoint, level);
84
85 // System.out.println(startEnv.getStartX() + ":" +startEnv.getStartY());
86 // System.out.println(stopEnv.getStartX() + ":" +stopEnv.getStartY());
87 PreparedStatement preparedStatement;
88 ResultSet rs;
89
90 for(int i = startEnv.getStartX(); i <= stopEnv.getStartX(); i++){
91 for(int j = stopEnv.getStartY(); j<= startEnv.getStartY(); j++){
92 boolean hasData = false;
93 try{
94 // 查询瓦片是否存在
95 String querySQL = "select * from " + type + " where TILELEVEL = " + level + " and TILECOL = " + i + " and TILEROW = " + j;
96 rs = stmt.executeQuery(querySQL);
97 while(rs.next()){
98 hasData = true;
99 }
100 // 如果不存在
101 if(!hasData){
102 String url = new TDTUrl(level, i, j, type).generatUrl();
103 // 获得地图瓦片
104 byte[] img = getTile(url);
105 System.out.println("正在下载 "+url);
106 // 将数据写入sqlite
107 String insertSQL = "INSERT INTO "+ type + "(TILELEVEL,TILECOL,TILEROW,TILEDATA) VALUES (?,?,?,?)";
108 preparedStatement = conn.prepareStatement(insertSQL);
109 preparedStatement.setInt(1, level);
110 preparedStatement.setInt(2, i);
111 preparedStatement.setInt(3, j);
112 preparedStatement.setBytes(4, img);
113 preparedStatement.execute();
114 }
115 }catch (Exception e){
116 System.out.println(e.getMessage());
117 }
118 }
119 conn.commit();
120 }
121 }catch (Exception e){
122 System.out.println(e.getMessage());
123 }
124 }
125
126 public void Download(Point minPoint, Point maxPoint, int minLevel, int maxLevel, TianDiTuTiledMapServiceType type) throws SQLException {
127 try {
128 Class.forName("org.sqlite.JDBC");
129 conn = DriverManager.getConnection("jdbc:sqlite:" + this.dbpath);
130 conn.setAutoCommit(false);
131 stmt = conn.createStatement();
132 // 新建数据表
133 String sql = "CREATE TABLE IF NOT EXISTS " + type +
134 "(TILELEVEL INT," +
135 "TILECOL INT," +
136 "TILEROW INT," +
137 "TILEDATA BLOB)";
138 stmt.executeUpdate(sql);
139 stmt.close();
140
141 for(int m = minLevel; m<= maxLevel; m++){
142 this.Download(minPoint, maxPoint, m, type);
143 }
144 conn.close();
145 System.out.println("下载完成");
146
147 }catch (Exception e){
148
149 }
150 }
151
152 protected byte[] getTile(String url) throws Exception {
153 byte[] result = null;
154 try {
155 // 如果没有就直接从web上读取
156 ByteArrayOutputStream bos = new ByteArrayOutputStream();
157
158 URL sjwurl = new URL(url);
159 HttpURLConnection httpUrl = null;
160 BufferedInputStream bis = null;
161 byte[] buf = new byte[1024];
162
163 httpUrl = (HttpURLConnection) sjwurl.openConnection();
164 httpUrl.connect();
165 bis = new BufferedInputStream(httpUrl.getInputStream());
166
167 while (true) {
168 int bytes_read = bis.read(buf);
169 if (bytes_read > 0) {
170 bos.write(buf, 0, bytes_read);
171 } else {
172 break;
173 }
174 }
175
176 bis.close();
177 httpUrl.disconnect();
178
179 result = bos.toByteArray();
180 } catch (Exception ex) {
181 ex.printStackTrace();
182 }
183
184 return result;
185 }
186 }