update 3.27
Showing
11 changed files
with
7 additions
and
35 deletions
This diff is collapsed.
Click to expand it.
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
No preview for this file type
1 | import utils.CalEnv; | ||
2 | import utils.Point; | 1 | import utils.Point; |
3 | import utils.TianDiTuTiledMapServiceType; | 2 | import utils.TianDiTuTiledMapServiceType; |
4 | 3 | ||
... | @@ -8,12 +7,13 @@ public class Main{ | ... | @@ -8,12 +7,13 @@ public class Main{ |
8 | 7 | ||
9 | 8 | ||
10 | public static void main(String[] args) throws SQLException { | 9 | public static void main(String[] args) throws SQLException { |
11 | System.out.println("Hello World!"); | 10 | System.out.println("开始下载,本程序仅支持下载CGCS2000的天地图数据!"); |
12 | 11 | ||
13 | TiandituDownload tiandituDownload = new TiandituDownload("my.db"); | 12 | TiandituDownload tiandituDownload = new TiandituDownload("my.db"); |
14 | Point pt = new Point(29.76,106.64); | 13 | Point pt = new Point(29.76,106.64); |
15 | Point pt2 = new Point(35.33, 108.12); | 14 | Point pt2 = new Point(35.33, 108.12); |
16 | 15 | ||
17 | tiandituDownload.Download(pt, pt2, 7,9, TianDiTuTiledMapServiceType.VEC_C, true); | 16 | tiandituDownload.Download(pt, pt2, 7,9, TianDiTuTiledMapServiceType.IMG_C, true); |
18 | } | 17 | } |
18 | |||
19 | } | 19 | } | ... | ... |
1 | import utils.CalEnv; | 1 | import utils.*; |
2 | import utils.Point; | 2 | import utils.Point; |
3 | import utils.TDTUrl; | ||
4 | import utils.TianDiTuTiledMapServiceType; | ||
5 | 3 | ||
6 | import javax.imageio.ImageIO; | 4 | import javax.imageio.ImageIO; |
7 | import java.awt.*; | 5 | import java.awt.*; |
... | @@ -221,6 +219,7 @@ public class TiandituDownload { | ... | @@ -221,6 +219,7 @@ public class TiandituDownload { |
221 | } | 219 | } |
222 | } | 220 | } |
223 | 221 | ||
222 | |||
224 | /** | 223 | /** |
225 | * @param minPoint 下载范围左下角坐标 | 224 | * @param minPoint 下载范围左下角坐标 |
226 | * @param maxPoint 下载范围右上角坐标 | 225 | * @param maxPoint 下载范围右上角坐标 | ... | ... |
... | @@ -22,6 +22,7 @@ public class TDTUrl { | ... | @@ -22,6 +22,7 @@ public class TDTUrl { |
22 | this._tiandituMapServiceType = tiandituMapServiceType; | 22 | this._tiandituMapServiceType = tiandituMapServiceType; |
23 | } | 23 | } |
24 | 24 | ||
25 | |||
25 | public String generatUrl() { | 26 | public String generatUrl() { |
26 | 27 | ||
27 | StringBuilder url = new StringBuilder("http://t"); | 28 | StringBuilder url = new StringBuilder("http://t"); |
... | @@ -41,18 +42,6 @@ public class TDTUrl { | ... | @@ -41,18 +42,6 @@ public class TDTUrl { |
41 | case IMG_C: | 42 | case IMG_C: |
42 | url.append(".tianditu.com/DataServer?T=img_c&X=").append(this._col).append("&Y=").append(this._row).append("&L=").append(this._level); | 43 | url.append(".tianditu.com/DataServer?T=img_c&X=").append(this._col).append("&Y=").append(this._row).append("&L=").append(this._level); |
43 | break; | 44 | break; |
44 | case VEC_W: | ||
45 | url.append(".tianditu.com/DataServer?T=vec_w&X=").append(this._col).append("&Y=").append(this._row).append("&L=").append(this._level); | ||
46 | break; | ||
47 | case CVA_W: | ||
48 | url.append(".tianditu.com/DataServer?T=cva_w&X=").append(this._col).append("&Y=").append(this._row).append("&L=").append(this._level); | ||
49 | break; | ||
50 | case CIA_W: | ||
51 | url.append(".tianditu.com/DataServer?T=cia_w&X=").append(this._col).append("&Y=").append(this._row).append("&L=").append(this._level); | ||
52 | break; | ||
53 | case IMG_W: | ||
54 | url.append(".tianditu.com/DataServer?T=img_w&X=").append(this._col).append("&Y=").append(this._row).append("&L=").append(this._level); | ||
55 | break; | ||
56 | default: | 45 | default: |
57 | return null; | 46 | return null; |
58 | } | 47 | } | ... | ... |
... | @@ -21,22 +21,6 @@ public enum TianDiTuTiledMapServiceType { | ... | @@ -21,22 +21,6 @@ public enum TianDiTuTiledMapServiceType { |
21 | /** | 21 | /** |
22 | * 影像注记 | 22 | * 影像注记 |
23 | * */ | 23 | * */ |
24 | CIA_C, | 24 | CIA_C; |
25 | /** | ||
26 | * 矢量数据,web墨卡托4326 | ||
27 | */ | ||
28 | VEC_W, | ||
29 | /** | ||
30 | * 影像数据 | ||
31 | * */ | ||
32 | IMG_W, | ||
33 | /** | ||
34 | * 矢量注记 | ||
35 | * */ | ||
36 | CVA_W, | ||
37 | /** | ||
38 | * 影像注记 | ||
39 | * */ | ||
40 | CIA_W; | ||
41 | 25 | ||
42 | } | 26 | } | ... | ... |
-
Please register or sign in to post a comment