├── GisViewer.sln
├── GisViewer
├── AbilityCircleDataManager.hpp
├── DataManager.hpp
├── DealEntityMsgThread.cpp
├── DealEntityMsgThread.h
├── DrawItemLayer.cpp
├── DrawItemLayer.h
├── EntityItem.cpp
├── EntityItem.h
├── EntityLayer.cpp
├── EntityLayer.h
├── GeoMath.cpp
├── GeoMath.h
├── GeoToQtMath.cpp
├── GeoToQtMath.h
├── GisEntity.h
├── GisLayerItem.cpp
├── GisLayerItem.h
├── GisSignals.h
├── GisStatus.cpp
├── GisStatus.h
├── GisViewer.cpp
├── GisViewer.h
├── GisViewer.vcxproj
├── GisViewer.vcxproj.filters
├── LoadTileFromMbtiles.cpp
├── LoadTileFromMbtiles.h
├── LoadTileThread.cpp
├── LoadTileThread.h
├── MapItem.cpp
├── MapItem.h
├── MouseLonLatItem.cpp
├── MouseLonLatItem.h
├── Quat.h
├── ReadGisConfig.cpp
├── ReadGisConfig.h
├── RouteAreaLayer.cpp
├── RouteAreaLayer.h
├── RouteItem.cpp
├── RouteItem.h
├── RouteNodeItem.cpp
├── RouteNodeItem.h
├── TestDistance.cpp
├── TestDistance.h
├── TileItem.cpp
├── TileItem.h
├── TileSystem.cpp
├── TileSystem.h
└── Vec3d.h
├── GisViewerExample
├── GisViewerExample.vcxproj
├── GisViewerExample.vcxproj.filters
├── config.ini
└── main.cpp
├── LICENSE
├── README.md
├── include
├── GisStruct.h
└── Serialization.h
└── png
└── 20210725032515.png
/GisViewer.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.25420.1
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{EFF89947-49D1-4454-BD17-E87E255D42C7}"
7 | ProjectSection(SolutionItems) = preProject
8 | include\GisStruct.h = include\GisStruct.h
9 | include\Serialization.h = include\Serialization.h
10 | EndProjectSection
11 | EndProject
12 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GisViewerExample", "GisViewerExample\GisViewerExample.vcxproj", "{79F36C8B-31AA-4298-B112-D3EA8C9C6528}"
13 | ProjectSection(ProjectDependencies) = postProject
14 | {64179E62-E6B6-4BCF-A0D5-3E58EE0F498E} = {64179E62-E6B6-4BCF-A0D5-3E58EE0F498E}
15 | EndProjectSection
16 | EndProject
17 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GisViewer", "GisViewer\GisViewer.vcxproj", "{64179E62-E6B6-4BCF-A0D5-3E58EE0F498E}"
18 | EndProject
19 | Global
20 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
21 | Debug|Win32 = Debug|Win32
22 | Debug|x64 = Debug|x64
23 | Release|Win32 = Release|Win32
24 | Release|x64 = Release|x64
25 | EndGlobalSection
26 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
27 | {79F36C8B-31AA-4298-B112-D3EA8C9C6528}.Debug|Win32.ActiveCfg = Debug|x64
28 | {79F36C8B-31AA-4298-B112-D3EA8C9C6528}.Debug|x64.ActiveCfg = Debug|x64
29 | {79F36C8B-31AA-4298-B112-D3EA8C9C6528}.Debug|x64.Build.0 = Debug|x64
30 | {79F36C8B-31AA-4298-B112-D3EA8C9C6528}.Release|Win32.ActiveCfg = Release|x64
31 | {79F36C8B-31AA-4298-B112-D3EA8C9C6528}.Release|x64.ActiveCfg = Release|x64
32 | {79F36C8B-31AA-4298-B112-D3EA8C9C6528}.Release|x64.Build.0 = Release|x64
33 | {64179E62-E6B6-4BCF-A0D5-3E58EE0F498E}.Debug|Win32.ActiveCfg = Debug|Win32
34 | {64179E62-E6B6-4BCF-A0D5-3E58EE0F498E}.Debug|Win32.Build.0 = Debug|Win32
35 | {64179E62-E6B6-4BCF-A0D5-3E58EE0F498E}.Debug|x64.ActiveCfg = Debug|x64
36 | {64179E62-E6B6-4BCF-A0D5-3E58EE0F498E}.Debug|x64.Build.0 = Debug|x64
37 | {64179E62-E6B6-4BCF-A0D5-3E58EE0F498E}.Release|Win32.ActiveCfg = Release|Win32
38 | {64179E62-E6B6-4BCF-A0D5-3E58EE0F498E}.Release|Win32.Build.0 = Release|Win32
39 | {64179E62-E6B6-4BCF-A0D5-3E58EE0F498E}.Release|x64.ActiveCfg = Release|x64
40 | {64179E62-E6B6-4BCF-A0D5-3E58EE0F498E}.Release|x64.Build.0 = Release|x64
41 | EndGlobalSection
42 | GlobalSection(SolutionProperties) = preSolution
43 | HideSolutionNode = FALSE
44 | EndGlobalSection
45 | GlobalSection(ExtensibilityGlobals) = postSolution
46 | Qt5Version = msvc2015_64
47 | EndGlobalSection
48 | EndGlobal
49 |
--------------------------------------------------------------------------------
/GisViewer/AbilityCircleDataManager.hpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iGwkang/QtGis/f3b89ad4ea2b6be0b8b07b46fea36cd47d2a6ecb/GisViewer/AbilityCircleDataManager.hpp
--------------------------------------------------------------------------------
/GisViewer/DataManager.hpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iGwkang/QtGis/f3b89ad4ea2b6be0b8b07b46fea36cd47d2a6ecb/GisViewer/DataManager.hpp
--------------------------------------------------------------------------------
/GisViewer/DealEntityMsgThread.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iGwkang/QtGis/f3b89ad4ea2b6be0b8b07b46fea36cd47d2a6ecb/GisViewer/DealEntityMsgThread.cpp
--------------------------------------------------------------------------------
/GisViewer/DealEntityMsgThread.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iGwkang/QtGis/f3b89ad4ea2b6be0b8b07b46fea36cd47d2a6ecb/GisViewer/DealEntityMsgThread.h
--------------------------------------------------------------------------------
/GisViewer/DrawItemLayer.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iGwkang/QtGis/f3b89ad4ea2b6be0b8b07b46fea36cd47d2a6ecb/GisViewer/DrawItemLayer.cpp
--------------------------------------------------------------------------------
/GisViewer/DrawItemLayer.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iGwkang/QtGis/f3b89ad4ea2b6be0b8b07b46fea36cd47d2a6ecb/GisViewer/DrawItemLayer.h
--------------------------------------------------------------------------------
/GisViewer/EntityItem.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iGwkang/QtGis/f3b89ad4ea2b6be0b8b07b46fea36cd47d2a6ecb/GisViewer/EntityItem.cpp
--------------------------------------------------------------------------------
/GisViewer/EntityItem.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iGwkang/QtGis/f3b89ad4ea2b6be0b8b07b46fea36cd47d2a6ecb/GisViewer/EntityItem.h
--------------------------------------------------------------------------------
/GisViewer/EntityLayer.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iGwkang/QtGis/f3b89ad4ea2b6be0b8b07b46fea36cd47d2a6ecb/GisViewer/EntityLayer.cpp
--------------------------------------------------------------------------------
/GisViewer/EntityLayer.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iGwkang/QtGis/f3b89ad4ea2b6be0b8b07b46fea36cd47d2a6ecb/GisViewer/EntityLayer.h
--------------------------------------------------------------------------------
/GisViewer/GeoMath.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iGwkang/QtGis/f3b89ad4ea2b6be0b8b07b46fea36cd47d2a6ecb/GisViewer/GeoMath.cpp
--------------------------------------------------------------------------------
/GisViewer/GeoMath.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iGwkang/QtGis/f3b89ad4ea2b6be0b8b07b46fea36cd47d2a6ecb/GisViewer/GeoMath.h
--------------------------------------------------------------------------------
/GisViewer/GeoToQtMath.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iGwkang/QtGis/f3b89ad4ea2b6be0b8b07b46fea36cd47d2a6ecb/GisViewer/GeoToQtMath.cpp
--------------------------------------------------------------------------------
/GisViewer/GeoToQtMath.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iGwkang/QtGis/f3b89ad4ea2b6be0b8b07b46fea36cd47d2a6ecb/GisViewer/GeoToQtMath.h
--------------------------------------------------------------------------------
/GisViewer/GisEntity.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iGwkang/QtGis/f3b89ad4ea2b6be0b8b07b46fea36cd47d2a6ecb/GisViewer/GisEntity.h
--------------------------------------------------------------------------------
/GisViewer/GisLayerItem.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iGwkang/QtGis/f3b89ad4ea2b6be0b8b07b46fea36cd47d2a6ecb/GisViewer/GisLayerItem.cpp
--------------------------------------------------------------------------------
/GisViewer/GisLayerItem.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iGwkang/QtGis/f3b89ad4ea2b6be0b8b07b46fea36cd47d2a6ecb/GisViewer/GisLayerItem.h
--------------------------------------------------------------------------------
/GisViewer/GisSignals.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iGwkang/QtGis/f3b89ad4ea2b6be0b8b07b46fea36cd47d2a6ecb/GisViewer/GisSignals.h
--------------------------------------------------------------------------------
/GisViewer/GisStatus.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iGwkang/QtGis/f3b89ad4ea2b6be0b8b07b46fea36cd47d2a6ecb/GisViewer/GisStatus.cpp
--------------------------------------------------------------------------------
/GisViewer/GisStatus.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iGwkang/QtGis/f3b89ad4ea2b6be0b8b07b46fea36cd47d2a6ecb/GisViewer/GisStatus.h
--------------------------------------------------------------------------------
/GisViewer/GisViewer.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iGwkang/QtGis/f3b89ad4ea2b6be0b8b07b46fea36cd47d2a6ecb/GisViewer/GisViewer.cpp
--------------------------------------------------------------------------------
/GisViewer/GisViewer.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iGwkang/QtGis/f3b89ad4ea2b6be0b8b07b46fea36cd47d2a6ecb/GisViewer/GisViewer.h
--------------------------------------------------------------------------------
/GisViewer/GisViewer.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Debug
10 | x64
11 |
12 |
13 | Release
14 | Win32
15 |
16 |
17 | Release
18 | x64
19 |
20 |
21 |
22 | {64179E62-E6B6-4BCF-A0D5-3E58EE0F498E}
23 | QtVS_v304
24 | 8.1
25 | $(MSBuildProjectDirectory)\QtMsBuild
26 |
27 |
28 |
29 | DynamicLibrary
30 | v141
31 |
32 |
33 | DynamicLibrary
34 | v141
35 |
36 |
37 | DynamicLibrary
38 | v140
39 |
40 |
41 | DynamicLibrary
42 | v141
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 | $(SolutionDir)$(Platform)\$(Configuration)\
68 | $(OutDir);$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);$(NETFXKitsDir)Lib\um\x64
69 | ../include;$(VC_IncludePath);$(WindowsSDK_IncludePath);
70 |
71 |
72 | $(SolutionDir)$(Platform)\$(Configuration)\
73 | $(SolutionDir)3rdparty/lib;$(OutDir);$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86);$(NETFXKitsDir)Lib\um\x86
74 | $(SolutionDir)3rdparty/include;$(SolutionDir)include;$(VC_IncludePath);$(WindowsSDK_IncludePath);
75 |
76 |
77 | $(SolutionDir)$(Platform)\$(Configuration)\
78 |
79 |
80 | $(SolutionDir)$(Platform)\$(Configuration)\
81 |
82 |
83 | 5.12.8_msvc2017_64
84 | core;xml;sql;network;gui;svg;widgets
85 |
86 |
87 | msvc2015
88 | core;xml;sql;gui;svg;widgets
89 |
90 |
91 | 5.12.8_msvc2017_64
92 | core;xml;sql;network;gui;svg;widgets
93 |
94 |
95 | 5.12.8_msvc2017_64
96 | core;xml;sql;gui;svg;widgets
97 |
98 |
99 |
100 |
101 |
102 |
103 | true
104 | UNICODE;_UNICODE;WIN32;WIN64;GISVIEWER_LIB;%(PreprocessorDefinitions)
105 | ../include;.\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;.;%(AdditionalIncludeDirectories)
106 | Disabled
107 | ProgramDatabase
108 | MultiThreadedDebugDLL
109 | true
110 | true
111 |
112 |
113 | Windows
114 | $(OutDir)\$(ProjectName).dll
115 | %(AdditionalLibraryDirectories)
116 | true
117 | %(AdditionalDependencies)
118 |
119 |
120 | Moc'ing %(Identity)...
121 | ../../%(Filename)%(Extension)
122 | output
123 | .\GeneratedFiles\$(ConfigurationName)
124 | moc_%(Filename).cpp
125 |
126 |
127 |
128 |
129 | true
130 | UNICODE;_UNICODE;WIN32;WIN64;GISVIEWER_LIB;%(PreprocessorDefinitions)
131 | ../include;.\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;.;%(AdditionalIncludeDirectories)
132 | Disabled
133 | ProgramDatabase
134 | MultiThreadedDebugDLL
135 | true
136 | true
137 |
138 |
139 | Windows
140 | $(OutDir)\$(ProjectName).dll
141 | %(AdditionalLibraryDirectories)
142 | true
143 | %(AdditionalDependencies)
144 |
145 |
146 | Moc'ing %(Identity)...
147 | ../../%(Filename)%(Extension)
148 | output
149 | .\GeneratedFiles\$(ConfigurationName)
150 | moc_%(Filename).cpp
151 |
152 |
153 |
154 |
155 | true
156 | UNICODE;_UNICODE;WIN32;WIN64;QT_NO_DEBUG;NDEBUG;GISVIEWER_LIB;%(PreprocessorDefinitions)
157 | ../include;.\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;.;%(AdditionalIncludeDirectories)
158 |
159 |
160 | MultiThreadedDLL
161 | true
162 | true
163 |
164 |
165 | Windows
166 | $(OutDir)\$(ProjectName).dll
167 | %(AdditionalLibraryDirectories)
168 | No
169 | %(AdditionalDependencies)
170 |
171 |
172 | Moc'ing %(Identity)...
173 | output
174 | .\GeneratedFiles\$(ConfigurationName)
175 | moc_%(Filename).cpp
176 |
177 |
178 |
179 |
180 | true
181 | UNICODE;_UNICODE;WIN32;WIN64;QT_NO_DEBUG;NDEBUG;GISVIEWER_LIB;%(PreprocessorDefinitions)
182 | ../include;.\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;.;%(AdditionalIncludeDirectories)
183 |
184 |
185 | MultiThreadedDLL
186 | true
187 | true
188 |
189 |
190 | Windows
191 | $(OutDir)\$(ProjectName).dll
192 | %(AdditionalLibraryDirectories)
193 | No
194 | %(AdditionalDependencies)
195 |
196 |
197 | Moc'ing %(Identity)...
198 | output
199 | .\GeneratedFiles\$(ConfigurationName)
200 | moc_%(Filename).cpp
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 |
301 |
302 |
303 |
304 |
305 |
306 |
307 |
308 |
309 |
310 |
311 |
312 |
313 |
314 |
315 |
316 |
317 |
318 |
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 |
330 |
331 |
332 |
333 |
334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 |
342 |
343 |
344 |
345 |
346 |
347 |
348 |
349 |
350 |
351 |
352 |
353 |
354 |
355 |
356 |
357 |
358 |
359 |
360 |
361 |
362 |
363 |
364 |
365 |
366 |
367 |
368 |
369 |
370 |
371 |
372 |
373 |
374 |
375 |
376 |
377 |
378 |
379 |
380 |
381 |
382 |
383 |
384 |
385 |
386 |
387 |
388 |
389 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
397 |
398 |
399 |
400 |
401 |
402 |
403 | Performing Custom Build Tools
404 |
405 |
406 |
407 |
408 |
409 |
410 | Performing Custom Build Tools
411 |
412 |
413 |
414 |
415 |
416 |
417 | Performing Custom Build Tools
418 |
419 |
420 |
421 |
422 |
423 |
424 | Performing Custom Build Tools
425 |
426 |
427 |
428 |
429 |
430 |
431 |
432 |
433 | Performing Custom Build Tools
434 |
435 |
436 |
437 |
438 |
439 |
440 | Performing Custom Build Tools
441 |
442 |
443 |
444 |
445 |
446 |
447 | Performing Custom Build Tools
448 |
449 |
450 |
451 |
452 |
453 |
454 | Performing Custom Build Tools
455 |
456 |
457 |
458 |
459 |
460 |
461 |
462 |
463 | Performing Custom Build Tools
464 |
465 |
466 |
467 |
468 |
469 |
470 | Performing Custom Build Tools
471 |
472 |
473 |
474 |
475 |
476 |
477 | Performing Custom Build Tools
478 |
479 |
480 |
481 |
482 |
483 |
484 | Performing Custom Build Tools
485 |
486 |
487 |
488 |
489 |
490 |
491 |
492 |
493 | Performing Custom Build Tools
494 |
495 |
496 |
497 |
498 |
499 |
500 | Performing Custom Build Tools
501 |
502 |
503 |
504 |
505 |
506 |
507 | Performing Custom Build Tools
508 |
509 |
510 |
511 |
512 |
513 |
514 | Performing Custom Build Tools
515 |
516 |
517 |
518 |
519 |
520 |
521 |
522 |
523 | Performing Custom Build Tools
524 |
525 |
526 |
527 |
528 |
529 |
530 | Performing Custom Build Tools
531 |
532 |
533 |
534 |
535 |
536 |
537 | Performing Custom Build Tools
538 |
539 |
540 |
541 |
542 |
543 |
544 | Performing Custom Build Tools
545 |
546 |
547 |
548 |
549 |
550 |
551 |
552 |
553 |
554 |
555 | .\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtWidgets
556 | .\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtWidgets
557 | .\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtWidgets
558 | .\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtWidgets
559 |
560 |
561 |
562 |
563 |
564 |
565 |
566 |
567 |
568 |
569 |
570 |
571 |
572 |
573 |
574 |
575 |
576 |
577 |
578 |
579 |
580 |
581 |
582 |
583 |
584 |
585 |
586 |
587 |
588 |
589 |
590 |
591 |
592 |
593 |
594 |
595 |
596 |
597 | Performing Custom Build Tools
598 |
599 |
600 |
601 |
602 |
603 |
604 | Performing Custom Build Tools
605 |
606 |
607 |
608 |
609 |
610 |
611 | Performing Custom Build Tools
612 |
613 |
614 |
615 |
616 |
617 |
618 | Performing Custom Build Tools
619 |
620 |
621 |
622 |
623 |
624 |
625 |
626 |
627 | Performing Custom Build Tools
628 |
629 |
630 |
631 |
632 |
633 |
634 | Performing Custom Build Tools
635 |
636 |
637 |
638 |
639 |
640 |
641 | Performing Custom Build Tools
642 |
643 |
644 |
645 |
646 |
647 |
648 | Performing Custom Build Tools
649 |
650 |
651 |
652 |
653 |
654 |
655 |
656 |
657 | Performing Custom Build Tools
658 |
659 |
660 |
661 |
662 |
663 |
664 | Performing Custom Build Tools
665 |
666 |
667 |
668 |
669 |
670 |
671 | Performing Custom Build Tools
672 |
673 |
674 |
675 |
676 |
677 |
678 | Performing Custom Build Tools
679 |
680 |
681 |
682 |
683 |
684 |
685 | .\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtSql
686 | .\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtSql
687 | .\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtSql
688 | .\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtSql
689 |
690 |
691 | Performing Custom Build Tools
692 |
693 |
694 |
695 |
696 |
697 |
698 | Performing Custom Build Tools
699 |
700 |
701 |
702 |
703 |
704 |
705 | Performing Custom Build Tools
706 |
707 |
708 |
709 |
710 |
711 |
712 | Performing Custom Build Tools
713 |
714 |
715 |
716 |
717 |
718 |
719 | .\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtWidgets
720 | .\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtWidgets
721 | .\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtWidgets
722 | .\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtWidgets
723 |
724 |
725 |
726 |
727 |
728 |
729 |
730 |
731 |
732 |
733 |
734 |
735 |
736 |
737 |
738 |
739 |
740 |
741 |
742 |
743 |
744 |
745 |
746 |
747 |
748 |
749 |
750 |
751 |
752 |
753 |
754 |
755 |
756 |
757 |
758 |
759 | Performing Custom Build Tools
760 |
761 |
762 |
763 |
764 |
765 |
766 | Performing Custom Build Tools
767 |
768 |
769 |
770 |
771 |
772 |
773 | Performing Custom Build Tools
774 |
775 |
776 |
777 |
778 |
779 |
780 | Performing Custom Build Tools
781 |
782 |
783 |
784 |
785 |
786 |
787 |
788 |
789 | Performing Custom Build Tools
790 |
791 |
792 |
793 |
794 |
795 |
796 | Performing Custom Build Tools
797 |
798 |
799 |
800 |
801 |
802 |
803 | Performing Custom Build Tools
804 |
805 |
806 |
807 |
808 |
809 |
810 | Performing Custom Build Tools
811 |
812 |
813 |
814 |
815 |
816 |
817 |
818 |
819 | Performing Custom Build Tools
820 |
821 |
822 |
823 |
824 |
825 |
826 | Performing Custom Build Tools
827 |
828 |
829 |
830 |
831 |
832 |
833 | Performing Custom Build Tools
834 |
835 |
836 |
837 |
838 |
839 |
840 | Performing Custom Build Tools
841 |
842 |
843 |
844 |
845 |
846 |
847 |
848 |
849 |
850 |
851 |
852 |
853 | Performing Custom Build Tools
854 |
855 |
856 |
857 |
858 |
859 |
860 | Performing Custom Build Tools
861 |
862 |
863 |
864 |
865 |
866 |
867 | Performing Custom Build Tools
868 |
869 |
870 |
871 |
872 |
873 |
874 | Performing Custom Build Tools
875 |
876 |
877 |
878 |
879 |
880 |
881 |
882 |
883 |
884 |
885 |
886 |
887 |
888 |
889 |
890 |
891 |
892 |
--------------------------------------------------------------------------------
/GisViewer/GisViewer.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {D9D6E242-F8AF-46E4-B9FD-80ECBC20BA3E}
6 | qrc;*
7 | false
8 |
9 |
10 | {D9D6E242-F8AF-46E4-B9FD-80ECBC20BA3E}
11 | qrc;*
12 | false
13 |
14 |
15 | {f85a733f-d9ed-4975-80ea-cea614064f4f}
16 |
17 |
18 | {bc6fa4fe-070e-4737-9bfc-0d99adb01394}
19 |
20 |
21 | {507896c6-65c9-47ad-80ab-cbf45ee55079}
22 |
23 |
24 | {a530fc30-ce50-4753-b2fa-916ec208278c}
25 |
26 |
27 | {4aa0bc3b-8cbe-4cfe-8111-ac1ea2963bd6}
28 |
29 |
30 | {f2974032-c4f5-4aa2-b77f-b010d83225fc}
31 |
32 |
33 | {6dfc404b-868a-469e-9ec5-ac9b613000d7}
34 |
35 |
36 | {64a905b0-cd94-4302-ae94-f08815c7b0c1}
37 |
38 |
39 | {85c54d44-3190-42e0-bcfa-2d2f1b82bf03}
40 |
41 |
42 | {3e2f164f-95b8-4ba2-9a44-b9d3e2c53aaa}
43 |
44 |
45 |
46 |
47 | GisLayer\DrawLayer
48 |
49 |
50 | GisLayer\DrawLayer
51 |
52 |
53 | GisLayer\RouteLayer
54 |
55 |
56 | Config
57 |
58 |
59 | GisLayer\TileLayer
60 |
61 |
62 | GisLayer\TileLayer
63 |
64 |
65 | GisLayer\TileLayer
66 |
67 |
68 | GisLayer\TileLayer\load_mbtiles
69 |
70 |
71 | GisViewer
72 |
73 |
74 | GisLayer
75 |
76 |
77 | GisViewer
78 |
79 |
80 | GisLayer
81 |
82 |
83 | GisLayer\RouteLayer
84 |
85 |
86 | GisLayer\RouteLayer
87 |
88 |
89 | GisLayer\EntityLayer
90 |
91 |
92 | GisLayer\EntityLayer
93 |
94 |
95 | GisLayer\EntityLayer
96 |
97 |
98 | GeoMath
99 |
100 |
101 | GeoMath
102 |
103 |
104 | GeoMath
105 |
106 |
107 |
108 |
109 | GisViewer
110 |
111 |
112 | GisLayer\DrawLayer
113 |
114 |
115 | GisLayer\EntityLayer
116 |
117 |
118 | GisViewer
119 |
120 |
121 | GisLayer\DrawLayer
122 |
123 |
124 | GisLayer\EntityLayer
125 |
126 |
127 | GisLayer\EntityLayer
128 |
129 |
130 | GisLayer\RouteLayer
131 |
132 |
133 | GisLayer\RouteLayer
134 |
135 |
136 | GisLayer\TileLayer
137 |
138 |
139 | GisLayer\TileLayer
140 |
141 |
142 | GisViewer
143 |
144 |
145 | GisLayer
146 |
147 |
148 | GisLayer
149 |
150 |
151 | GisLayer\EntityLayer
152 |
153 |
154 | GisLayer\RouteLayer
155 |
156 |
157 | GisLayer\TileLayer
158 |
159 |
160 | GisLayer\TileLayer\load_mbtiles
161 |
162 |
163 | Config
164 |
165 |
166 | DataManager
167 |
168 |
169 | DataManager
170 |
171 |
172 | GeoMath
173 |
174 |
175 | GeoMath
176 |
177 |
178 | GeoMath
179 |
180 |
181 | GeoMath
182 |
183 |
184 | GeoMath
185 |
186 |
187 |
--------------------------------------------------------------------------------
/GisViewer/LoadTileFromMbtiles.cpp:
--------------------------------------------------------------------------------
1 | #include "LoadTileFromMbtiles.h"
2 | #include
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 |
9 | //#include
10 | //#if NDEBUG
11 | //#pragma comment(lib, "sqlite3")
12 | //#pragma comment(lib, "SQLiteCpp")
13 | //#else
14 | //#pragma comment(lib, "sqlite3d")
15 | //#pragma comment(lib, "SQLiteCppd")
16 | //#endif
17 |
18 | LoadTileFromMbtiles::LoadTileFromMbtiles()
19 | {
20 | //db = nullptr;
21 | }
22 |
23 |
24 | LoadTileFromMbtiles::~LoadTileFromMbtiles()
25 | {
26 | //delete db;
27 | //db = nullptr;
28 | }
29 |
30 | LoadTileFromMbtiles & LoadTileFromMbtiles::instance()
31 | {
32 | static LoadTileFromMbtiles _instance;
33 | return _instance;
34 | }
35 |
36 | void LoadTileFromMbtiles::setTileFilePath(const std::string &path)
37 | {
38 | dbPath = path;
39 |
40 | //if (db)
41 | //{
42 | // delete db;
43 | //}
44 | //db = new SQLite::Database(dbPath);
45 | database.close();
46 |
47 | database = QSqlDatabase::addDatabase("QSQLITE", dbPath.c_str());
48 | database.setDatabaseName(dbPath.c_str());
49 | if (!database.open())
50 | {
51 | std::cout << database.lastError().text().toStdString() << std::endl;
52 | }
53 | }
54 |
55 | bool LoadTileFromMbtiles::getTile(int level, int tileX, int tileY, QImage &image)
56 | {
57 | //if (!db)
58 | // return false;
59 |
60 | //SQLite::Database db(dbPath);
61 | char buf[128] = {0};
62 | std::sprintf(buf, "SELECT tile_data FROM tiles WHERE zoom_level=%d AND tile_column=%d AND tile_row=%d", level, tileX, tileY);
63 | //SQLite::Statement query(*db, buf);
64 | //
65 | //if (query.executeStep())
66 | //{
67 | // //const std::string col1 = query.getColumn(0).getName(); // col1 = "zoom_level" z
68 | // //const std::string col2 = query.getColumn(1).getName(); // col2 = "tile_column" x
69 | // //const std::string col3 = query.getColumn(2).getName(); // col3 = "tile_row" y
70 | // //const std::string col4 = query.getColumn(3).getName(); // col4 = "tile_data" data
71 |
72 | // int len = query.getColumn("tile_data").getBytes();
73 | // const char *data = query.getColumn("tile_data");
74 | // image = QImage::fromData((uchar *)data, len);
75 | //}
76 |
77 | QSqlQuery query = database.exec(buf);
78 | //QSqlQuery query(database);
79 | //query.prepare("SELECT tile_data FROM tiles WHERE zoom_level=:z AND tile_column=:tx AND tile_row=:ty");
80 | //query.bindValue(":z", level);
81 | //query.bindValue(":tx", tileX);
82 | //query.bindValue(":ty", tileY);
83 | //query.exec();
84 |
85 | if (query.next())
86 | {
87 | QByteArray data = query.value("tile_data").toByteArray();
88 | image = QImage::fromData(data);
89 | }
90 | return !image.isNull();
91 | }
92 |
--------------------------------------------------------------------------------
/GisViewer/LoadTileFromMbtiles.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iGwkang/QtGis/f3b89ad4ea2b6be0b8b07b46fea36cd47d2a6ecb/GisViewer/LoadTileFromMbtiles.h
--------------------------------------------------------------------------------
/GisViewer/LoadTileThread.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iGwkang/QtGis/f3b89ad4ea2b6be0b8b07b46fea36cd47d2a6ecb/GisViewer/LoadTileThread.cpp
--------------------------------------------------------------------------------
/GisViewer/LoadTileThread.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iGwkang/QtGis/f3b89ad4ea2b6be0b8b07b46fea36cd47d2a6ecb/GisViewer/LoadTileThread.h
--------------------------------------------------------------------------------
/GisViewer/MapItem.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iGwkang/QtGis/f3b89ad4ea2b6be0b8b07b46fea36cd47d2a6ecb/GisViewer/MapItem.cpp
--------------------------------------------------------------------------------
/GisViewer/MapItem.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iGwkang/QtGis/f3b89ad4ea2b6be0b8b07b46fea36cd47d2a6ecb/GisViewer/MapItem.h
--------------------------------------------------------------------------------
/GisViewer/MouseLonLatItem.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iGwkang/QtGis/f3b89ad4ea2b6be0b8b07b46fea36cd47d2a6ecb/GisViewer/MouseLonLatItem.cpp
--------------------------------------------------------------------------------
/GisViewer/MouseLonLatItem.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iGwkang/QtGis/f3b89ad4ea2b6be0b8b07b46fea36cd47d2a6ecb/GisViewer/MouseLonLatItem.h
--------------------------------------------------------------------------------
/GisViewer/Quat.h:
--------------------------------------------------------------------------------
1 | /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
2 | *
3 | * This library is open source and may be redistributed and/or modified under
4 | * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5 | * (at your option) any later version. The full license is in LICENSE file
6 | * included with this distribution, and on the openscenegraph.org website.
7 | *
8 | * This library is distributed in the hope that it will be useful,
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | * OpenSceneGraph Public License for more details.
12 | */
13 | #pragma once
14 | #include "Vec3d.h"
15 |
16 |
17 | //class Matrixf;
18 | //class Matrixd;
19 |
20 | /** A quaternion class. It can be used to represent an orientation in 3D space.*/
21 | class Quat
22 | {
23 |
24 | public:
25 |
26 | typedef double value_type;
27 |
28 | value_type _v[4]; // a four-vector
29 |
30 | inline Quat() { _v[0]=0.0; _v[1]=0.0; _v[2]=0.0; _v[3]=1.0; }
31 |
32 | inline Quat( value_type x, value_type y, value_type z, value_type w )
33 | {
34 | _v[0]=x;
35 | _v[1]=y;
36 | _v[2]=z;
37 | _v[3]=w;
38 | }
39 |
40 | /*
41 | inline Quat( const Vec4f& v )
42 | {
43 | _v[0]=v.x();
44 | _v[1]=v.y();
45 | _v[2]=v.z();
46 | _v[3]=v.w();
47 | }
48 |
49 |
50 | inline Quat( const Vec4d& v )
51 | {
52 | _v[0]=v.x();
53 | _v[1]=v.y();
54 | _v[2]=v.z();
55 | _v[3]=v.w();
56 | }
57 | */
58 |
59 | /*
60 | inline Quat( value_type angle, const Vec3f& axis)
61 | {
62 | makeRotate(angle,axis);
63 | }
64 | */
65 |
66 | inline Quat( value_type angle, const Vec3d& axis)
67 | {
68 | makeRotate(angle,axis);
69 | }
70 |
71 | /*
72 | inline Quat( value_type angle1, const Vec3f& axis1,
73 | value_type angle2, const Vec3f& axis2,
74 | value_type angle3, const Vec3f& axis3)
75 | {
76 | makeRotate(angle1,axis1,angle2,axis2,angle3,axis3);
77 | }
78 | */
79 |
80 | inline Quat( value_type angle1, const Vec3d& axis1,
81 | value_type angle2, const Vec3d& axis2,
82 | value_type angle3, const Vec3d& axis3)
83 | {
84 | makeRotate(angle1,axis1,angle2,axis2,angle3,axis3);
85 | }
86 |
87 | inline Quat& operator = (const Quat& v) { _v[0]=v._v[0]; _v[1]=v._v[1]; _v[2]=v._v[2]; _v[3]=v._v[3]; return *this; }
88 |
89 | inline bool operator == (const Quat& v) const { return _v[0]==v._v[0] && _v[1]==v._v[1] && _v[2]==v._v[2] && _v[3]==v._v[3]; }
90 |
91 | inline bool operator != (const Quat& v) const { return _v[0]!=v._v[0] || _v[1]!=v._v[1] || _v[2]!=v._v[2] || _v[3]!=v._v[3]; }
92 |
93 | inline bool operator < (const Quat& v) const
94 | {
95 | if (_v[0]v._v[0]) return false;
97 | else if (_v[1]v._v[1]) return false;
99 | else if (_v[2]v._v[2]) return false;
101 | else return (_v[3]
3 |
4 |
5 | TileItem::TileItem(QGraphicsItem *parent, const TileInfo &tile)
6 | : QGraphicsItem(parent), tileInfo(tile)
7 | {
8 | setZValue(tileInfo.level);
9 | }
10 |
11 | TileItem::~TileItem()
12 | {
13 | }
14 |
15 | QRectF TileItem::boundingRect() const
16 | {
17 | return QRectF(0, 0, 256, 256);
18 | }
19 |
20 | // void TileItem::setImage(QImage image)
21 | // {
22 | // tileInfo.image = image;
23 | // }
24 |
25 | void TileItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget /*= nullptr*/)
26 | {
27 | //painter->drawRect(image.rect());
28 | painter->drawImage(0, 0, tileInfo.image);
29 | }
30 |
--------------------------------------------------------------------------------
/GisViewer/TileItem.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iGwkang/QtGis/f3b89ad4ea2b6be0b8b07b46fea36cd47d2a6ecb/GisViewer/TileItem.h
--------------------------------------------------------------------------------
/GisViewer/TileSystem.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iGwkang/QtGis/f3b89ad4ea2b6be0b8b07b46fea36cd47d2a6ecb/GisViewer/TileSystem.cpp
--------------------------------------------------------------------------------
/GisViewer/TileSystem.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 |
4 | //坐标转换接口
5 | class TileSystem
6 | {
7 | TileSystem();
8 | ~TileSystem();
9 | public:
10 | //防止经纬度是否超出范围
11 | static double Clip(double n, double minValue, double maxValue);
12 |
13 | //地图大小
14 | static unsigned MapSize(int gisLevel);
15 |
16 | //1像素 = ? 米
17 | static double GroundResolution(double latitude, int gisLevel);
18 |
19 | //
20 | static double MapScale(double latitude, int gisLevel, int screenDpi);
21 |
22 | //经纬度转像素坐标
23 | static void LonLatToPixelXY(double lon, double lat, int gisLevel, int & pixelX, int & pixelY);
24 |
25 | //像素坐标转经纬度
26 | static void PixelXYToLonLat(int pixelX, int pixelY, int gisLevel, double & lon, double & lat);
27 |
28 | //像素点转瓦片坐标
29 | static void PixelXYToTileXY(int pixelX, int pixelY, int & tileX, int & tileY);
30 |
31 | //瓦片坐标转经纬度
32 | static void TileXYToPixelXY(int tileX, int tileY, int & pixelX, int & pixelY);
33 |
34 | //瓦片坐标转换为key
35 | static std::string TileXYToQuadKey(int tileX, int tileY, int gisLevel);
36 |
37 | //通过key值获取到瓦片的xy坐标和地图等级
38 | static void QuadKeyToTileXY(const std::string & key, int & tileX, int & tileY, int & gisLevel);
39 |
40 | };
41 |
42 |
--------------------------------------------------------------------------------
/GisViewer/Vec3d.h:
--------------------------------------------------------------------------------
1 | /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
2 | *
3 | * This library is open source and may be redistributed and/or modified under
4 | * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5 | * (at your option) any later version. The full license is in LICENSE file
6 | * included with this distribution, and on the openscenegraph.org website.
7 | *
8 | * This library is distributed in the hope that it will be useful,
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | * OpenSceneGraph Public License for more details.
12 | */
13 |
14 | /** General purpose double triple for use as vertices, vectors and normals.
15 | * Provides general math operations from addition through to cross products.
16 | * No support yet added for double * Vec3d - is it necessary?
17 | * Need to define a non-member non-friend operator* etc.
18 | * Vec3d * double is okay
19 | */
20 | #pragma once
21 | #include
22 |
23 |
24 | class Vec3d
25 | {
26 | public:
27 |
28 | /** Data type of vector components.*/
29 | typedef double value_type;
30 |
31 | /** Number of vector components. */
32 | enum { num_components = 3 };
33 |
34 | value_type _v[3];
35 |
36 | /** Constructor that sets all components of the vector to zero */
37 | Vec3d() { _v[0]=0.0; _v[1]=0.0; _v[2]=0.0;}
38 |
39 | // inline Vec3d(const Vec3f& vec) { _v[0]=vec._v[0]; _v[1]=vec._v[1]; _v[2]=vec._v[2];}
40 | //
41 | // inline operator Vec3f() const { return Vec3f(static_cast(_v[0]),static_cast(_v[1]),static_cast(_v[2]));}
42 |
43 | Vec3d(value_type x,value_type y,value_type z) { _v[0]=x; _v[1]=y; _v[2]=z; }
44 | // Vec3d(const Vec2d& v2,value_type zz)
45 | // {
46 | // _v[0] = v2[0];
47 | // _v[1] = v2[1];
48 | // _v[2] = zz;
49 | // }
50 |
51 | inline bool operator == (const Vec3d& v) const { return _v[0]==v._v[0] && _v[1]==v._v[1] && _v[2]==v._v[2]; }
52 |
53 | inline bool operator != (const Vec3d& v) const { return _v[0]!=v._v[0] || _v[1]!=v._v[1] || _v[2]!=v._v[2]; }
54 |
55 | inline bool operator < (const Vec3d& v) const
56 | {
57 | if (_v[0]v._v[0]) return false;
59 | else if (_v[1]v._v[1]) return false;
61 | else return (_v[2]0.0)
195 | {
196 | value_type inv = 1.0/norm;
197 | _v[0] *= inv;
198 | _v[1] *= inv;
199 | _v[2] *= inv;
200 | }
201 | return( norm );
202 | }
203 |
204 | }; // end of class Vec3d
205 |
206 | /** multiply by vector components. */
207 | inline Vec3d componentMultiply(const Vec3d& lhs, const Vec3d& rhs)
208 | {
209 | return Vec3d(lhs[0]*rhs[0], lhs[1]*rhs[1], lhs[2]*rhs[2]);
210 | }
211 |
212 | /** divide rhs components by rhs vector components. */
213 | inline Vec3d componentDivide(const Vec3d& lhs, const Vec3d& rhs)
214 | {
215 | return Vec3d(lhs[0]/rhs[0], lhs[1]/rhs[1], lhs[2]/rhs[2]);
216 | }
217 |
218 |
--------------------------------------------------------------------------------
/GisViewerExample/GisViewerExample.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | x64
7 |
8 |
9 | Release
10 | x64
11 |
12 |
13 |
14 | {79F36C8B-31AA-4298-B112-D3EA8C9C6528}
15 | QtVS_v304
16 | 8.1
17 | 8.1
18 | $(MSBuildProjectDirectory)\QtMsBuild
19 |
20 |
21 |
22 | Application
23 | v141
24 |
25 |
26 | Application
27 | v141
28 |
29 |
30 |
31 |
32 |
33 |
34 | 5.12.8_msvc2017_64
35 | core;gui;widgets
36 | debug
37 |
38 |
39 | 5.12.8_msvc2017_64
40 | core;gui;widgets
41 | release
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 | $(OutDir);$(Qt_LIBPATH_);%(AdditionalLibraryDirectories)
64 | GisViewer.lib;%(AdditionalDependencies)
65 |
66 |
67 | ../include;%(AdditionalIncludeDirectories)
68 |
69 |
70 |
71 |
72 | ../include;$(Qt_INCLUDEPATH_);%(AdditionalIncludeDirectories)
73 |
74 |
75 | $(OutDir);$(Qt_LIBPATH_);%(AdditionalLibraryDirectories)
76 | GisViewer.lib;$(Qt_LIBS_);%(AdditionalDependencies)
77 |
78 |
79 |
80 |
81 | true
82 | true
83 | ProgramDatabase
84 | Disabled
85 | MultiThreadedDebugDLL
86 |
87 |
88 | Windows
89 | true
90 |
91 |
92 |
93 |
94 | true
95 | true
96 | None
97 | MaxSpeed
98 | MultiThreadedDLL
99 |
100 |
101 | Windows
102 | false
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
--------------------------------------------------------------------------------
/GisViewerExample/GisViewerExample.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 |
10 |
11 | Source Files
12 |
13 |
14 |
--------------------------------------------------------------------------------
/GisViewerExample/config.ini:
--------------------------------------------------------------------------------
1 | [GisConfig]
2 | ; 瓦片路径 支持.mbtiles文件、本地瓦片目录、http瓦片接口
3 | ; 推荐使用本地瓦片,http接口加载较慢
4 | TilePath=http://wprd04.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=7&x={x}&y={y}&z={z}
5 | ;C:/Users/Gwkang/Downloads/title
6 | ;https://wprd04.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=6&x={x}&y={y}&z={z}
7 |
8 | ; 图片格式
9 | TileFormat=png
10 |
11 | ; 瓦片Y轴方向,有的瓦片是Y轴是 自上而下,有的是自下而上
12 | ; 自上而下填1,自下而上填2
13 | TileYOriginal=1
14 |
15 | ; 实体图标路径
16 | EntityIconDir=./svg/
17 |
18 | ; 军标路径
19 | MilitaryIconDir=./svg/military/
20 |
21 | ; 最大地图等级
22 | MaxLevel=17
23 |
24 | ; 最小地图等级
25 | MinLevel=3
26 |
27 | ; 初始化地图等级
28 | InitLevel=4
29 |
30 | ; 初始化视口经度
31 | InitLongitude=0
32 |
33 | ; 初始化视口纬度
34 | InitLatitude=60
35 |
--------------------------------------------------------------------------------
/GisViewerExample/main.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include "../GisViewer/GisViewer.h"
3 |
4 | int main(int argc, char *argv[])
5 | {
6 | QApplication a(argc, argv);
7 |
8 | GisViewer view;
9 | view.show();
10 |
11 | return a.exec();
12 | }
13 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU LESSER GENERAL PUBLIC LICENSE
2 | Version 2.1, February 1999
3 |
4 | Copyright (C) 1991, 1999 Free Software Foundation, Inc.
5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6 | Everyone is permitted to copy and distribute verbatim copies
7 | of this license document, but changing it is not allowed.
8 |
9 | [This is the first released version of the Lesser GPL. It also counts
10 | as the successor of the GNU Library Public License, version 2, hence
11 | the version number 2.1.]
12 |
13 | Preamble
14 |
15 | The licenses for most software are designed to take away your
16 | freedom to share and change it. By contrast, the GNU General Public
17 | Licenses are intended to guarantee your freedom to share and change
18 | free software--to make sure the software is free for all its users.
19 |
20 | This license, the Lesser General Public License, applies to some
21 | specially designated software packages--typically libraries--of the
22 | Free Software Foundation and other authors who decide to use it. You
23 | can use it too, but we suggest you first think carefully about whether
24 | this license or the ordinary General Public License is the better
25 | strategy to use in any particular case, based on the explanations below.
26 |
27 | When we speak of free software, we are referring to freedom of use,
28 | not price. Our General Public Licenses are designed to make sure that
29 | you have the freedom to distribute copies of free software (and charge
30 | for this service if you wish); that you receive source code or can get
31 | it if you want it; that you can change the software and use pieces of
32 | it in new free programs; and that you are informed that you can do
33 | these things.
34 |
35 | To protect your rights, we need to make restrictions that forbid
36 | distributors to deny you these rights or to ask you to surrender these
37 | rights. These restrictions translate to certain responsibilities for
38 | you if you distribute copies of the library or if you modify it.
39 |
40 | For example, if you distribute copies of the library, whether gratis
41 | or for a fee, you must give the recipients all the rights that we gave
42 | you. You must make sure that they, too, receive or can get the source
43 | code. If you link other code with the library, you must provide
44 | complete object files to the recipients, so that they can relink them
45 | with the library after making changes to the library and recompiling
46 | it. And you must show them these terms so they know their rights.
47 |
48 | We protect your rights with a two-step method: (1) we copyright the
49 | library, and (2) we offer you this license, which gives you legal
50 | permission to copy, distribute and/or modify the library.
51 |
52 | To protect each distributor, we want to make it very clear that
53 | there is no warranty for the free library. Also, if the library is
54 | modified by someone else and passed on, the recipients should know
55 | that what they have is not the original version, so that the original
56 | author's reputation will not be affected by problems that might be
57 | introduced by others.
58 |
59 | Finally, software patents pose a constant threat to the existence of
60 | any free program. We wish to make sure that a company cannot
61 | effectively restrict the users of a free program by obtaining a
62 | restrictive license from a patent holder. Therefore, we insist that
63 | any patent license obtained for a version of the library must be
64 | consistent with the full freedom of use specified in this license.
65 |
66 | Most GNU software, including some libraries, is covered by the
67 | ordinary GNU General Public License. This license, the GNU Lesser
68 | General Public License, applies to certain designated libraries, and
69 | is quite different from the ordinary General Public License. We use
70 | this license for certain libraries in order to permit linking those
71 | libraries into non-free programs.
72 |
73 | When a program is linked with a library, whether statically or using
74 | a shared library, the combination of the two is legally speaking a
75 | combined work, a derivative of the original library. The ordinary
76 | General Public License therefore permits such linking only if the
77 | entire combination fits its criteria of freedom. The Lesser General
78 | Public License permits more lax criteria for linking other code with
79 | the library.
80 |
81 | We call this license the "Lesser" General Public License because it
82 | does Less to protect the user's freedom than the ordinary General
83 | Public License. It also provides other free software developers Less
84 | of an advantage over competing non-free programs. These disadvantages
85 | are the reason we use the ordinary General Public License for many
86 | libraries. However, the Lesser license provides advantages in certain
87 | special circumstances.
88 |
89 | For example, on rare occasions, there may be a special need to
90 | encourage the widest possible use of a certain library, so that it becomes
91 | a de-facto standard. To achieve this, non-free programs must be
92 | allowed to use the library. A more frequent case is that a free
93 | library does the same job as widely used non-free libraries. In this
94 | case, there is little to gain by limiting the free library to free
95 | software only, so we use the Lesser General Public License.
96 |
97 | In other cases, permission to use a particular library in non-free
98 | programs enables a greater number of people to use a large body of
99 | free software. For example, permission to use the GNU C Library in
100 | non-free programs enables many more people to use the whole GNU
101 | operating system, as well as its variant, the GNU/Linux operating
102 | system.
103 |
104 | Although the Lesser General Public License is Less protective of the
105 | users' freedom, it does ensure that the user of a program that is
106 | linked with the Library has the freedom and the wherewithal to run
107 | that program using a modified version of the Library.
108 |
109 | The precise terms and conditions for copying, distribution and
110 | modification follow. Pay close attention to the difference between a
111 | "work based on the library" and a "work that uses the library". The
112 | former contains code derived from the library, whereas the latter must
113 | be combined with the library in order to run.
114 |
115 | GNU LESSER GENERAL PUBLIC LICENSE
116 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
117 |
118 | 0. This License Agreement applies to any software library or other
119 | program which contains a notice placed by the copyright holder or
120 | other authorized party saying it may be distributed under the terms of
121 | this Lesser General Public License (also called "this License").
122 | Each licensee is addressed as "you".
123 |
124 | A "library" means a collection of software functions and/or data
125 | prepared so as to be conveniently linked with application programs
126 | (which use some of those functions and data) to form executables.
127 |
128 | The "Library", below, refers to any such software library or work
129 | which has been distributed under these terms. A "work based on the
130 | Library" means either the Library or any derivative work under
131 | copyright law: that is to say, a work containing the Library or a
132 | portion of it, either verbatim or with modifications and/or translated
133 | straightforwardly into another language. (Hereinafter, translation is
134 | included without limitation in the term "modification".)
135 |
136 | "Source code" for a work means the preferred form of the work for
137 | making modifications to it. For a library, complete source code means
138 | all the source code for all modules it contains, plus any associated
139 | interface definition files, plus the scripts used to control compilation
140 | and installation of the library.
141 |
142 | Activities other than copying, distribution and modification are not
143 | covered by this License; they are outside its scope. The act of
144 | running a program using the Library is not restricted, and output from
145 | such a program is covered only if its contents constitute a work based
146 | on the Library (independent of the use of the Library in a tool for
147 | writing it). Whether that is true depends on what the Library does
148 | and what the program that uses the Library does.
149 |
150 | 1. You may copy and distribute verbatim copies of the Library's
151 | complete source code as you receive it, in any medium, provided that
152 | you conspicuously and appropriately publish on each copy an
153 | appropriate copyright notice and disclaimer of warranty; keep intact
154 | all the notices that refer to this License and to the absence of any
155 | warranty; and distribute a copy of this License along with the
156 | Library.
157 |
158 | You may charge a fee for the physical act of transferring a copy,
159 | and you may at your option offer warranty protection in exchange for a
160 | fee.
161 |
162 | 2. You may modify your copy or copies of the Library or any portion
163 | of it, thus forming a work based on the Library, and copy and
164 | distribute such modifications or work under the terms of Section 1
165 | above, provided that you also meet all of these conditions:
166 |
167 | a) The modified work must itself be a software library.
168 |
169 | b) You must cause the files modified to carry prominent notices
170 | stating that you changed the files and the date of any change.
171 |
172 | c) You must cause the whole of the work to be licensed at no
173 | charge to all third parties under the terms of this License.
174 |
175 | d) If a facility in the modified Library refers to a function or a
176 | table of data to be supplied by an application program that uses
177 | the facility, other than as an argument passed when the facility
178 | is invoked, then you must make a good faith effort to ensure that,
179 | in the event an application does not supply such function or
180 | table, the facility still operates, and performs whatever part of
181 | its purpose remains meaningful.
182 |
183 | (For example, a function in a library to compute square roots has
184 | a purpose that is entirely well-defined independent of the
185 | application. Therefore, Subsection 2d requires that any
186 | application-supplied function or table used by this function must
187 | be optional: if the application does not supply it, the square
188 | root function must still compute square roots.)
189 |
190 | These requirements apply to the modified work as a whole. If
191 | identifiable sections of that work are not derived from the Library,
192 | and can be reasonably considered independent and separate works in
193 | themselves, then this License, and its terms, do not apply to those
194 | sections when you distribute them as separate works. But when you
195 | distribute the same sections as part of a whole which is a work based
196 | on the Library, the distribution of the whole must be on the terms of
197 | this License, whose permissions for other licensees extend to the
198 | entire whole, and thus to each and every part regardless of who wrote
199 | it.
200 |
201 | Thus, it is not the intent of this section to claim rights or contest
202 | your rights to work written entirely by you; rather, the intent is to
203 | exercise the right to control the distribution of derivative or
204 | collective works based on the Library.
205 |
206 | In addition, mere aggregation of another work not based on the Library
207 | with the Library (or with a work based on the Library) on a volume of
208 | a storage or distribution medium does not bring the other work under
209 | the scope of this License.
210 |
211 | 3. You may opt to apply the terms of the ordinary GNU General Public
212 | License instead of this License to a given copy of the Library. To do
213 | this, you must alter all the notices that refer to this License, so
214 | that they refer to the ordinary GNU General Public License, version 2,
215 | instead of to this License. (If a newer version than version 2 of the
216 | ordinary GNU General Public License has appeared, then you can specify
217 | that version instead if you wish.) Do not make any other change in
218 | these notices.
219 |
220 | Once this change is made in a given copy, it is irreversible for
221 | that copy, so the ordinary GNU General Public License applies to all
222 | subsequent copies and derivative works made from that copy.
223 |
224 | This option is useful when you wish to copy part of the code of
225 | the Library into a program that is not a library.
226 |
227 | 4. You may copy and distribute the Library (or a portion or
228 | derivative of it, under Section 2) in object code or executable form
229 | under the terms of Sections 1 and 2 above provided that you accompany
230 | it with the complete corresponding machine-readable source code, which
231 | must be distributed under the terms of Sections 1 and 2 above on a
232 | medium customarily used for software interchange.
233 |
234 | If distribution of object code is made by offering access to copy
235 | from a designated place, then offering equivalent access to copy the
236 | source code from the same place satisfies the requirement to
237 | distribute the source code, even though third parties are not
238 | compelled to copy the source along with the object code.
239 |
240 | 5. A program that contains no derivative of any portion of the
241 | Library, but is designed to work with the Library by being compiled or
242 | linked with it, is called a "work that uses the Library". Such a
243 | work, in isolation, is not a derivative work of the Library, and
244 | therefore falls outside the scope of this License.
245 |
246 | However, linking a "work that uses the Library" with the Library
247 | creates an executable that is a derivative of the Library (because it
248 | contains portions of the Library), rather than a "work that uses the
249 | library". The executable is therefore covered by this License.
250 | Section 6 states terms for distribution of such executables.
251 |
252 | When a "work that uses the Library" uses material from a header file
253 | that is part of the Library, the object code for the work may be a
254 | derivative work of the Library even though the source code is not.
255 | Whether this is true is especially significant if the work can be
256 | linked without the Library, or if the work is itself a library. The
257 | threshold for this to be true is not precisely defined by law.
258 |
259 | If such an object file uses only numerical parameters, data
260 | structure layouts and accessors, and small macros and small inline
261 | functions (ten lines or less in length), then the use of the object
262 | file is unrestricted, regardless of whether it is legally a derivative
263 | work. (Executables containing this object code plus portions of the
264 | Library will still fall under Section 6.)
265 |
266 | Otherwise, if the work is a derivative of the Library, you may
267 | distribute the object code for the work under the terms of Section 6.
268 | Any executables containing that work also fall under Section 6,
269 | whether or not they are linked directly with the Library itself.
270 |
271 | 6. As an exception to the Sections above, you may also combine or
272 | link a "work that uses the Library" with the Library to produce a
273 | work containing portions of the Library, and distribute that work
274 | under terms of your choice, provided that the terms permit
275 | modification of the work for the customer's own use and reverse
276 | engineering for debugging such modifications.
277 |
278 | You must give prominent notice with each copy of the work that the
279 | Library is used in it and that the Library and its use are covered by
280 | this License. You must supply a copy of this License. If the work
281 | during execution displays copyright notices, you must include the
282 | copyright notice for the Library among them, as well as a reference
283 | directing the user to the copy of this License. Also, you must do one
284 | of these things:
285 |
286 | a) Accompany the work with the complete corresponding
287 | machine-readable source code for the Library including whatever
288 | changes were used in the work (which must be distributed under
289 | Sections 1 and 2 above); and, if the work is an executable linked
290 | with the Library, with the complete machine-readable "work that
291 | uses the Library", as object code and/or source code, so that the
292 | user can modify the Library and then relink to produce a modified
293 | executable containing the modified Library. (It is understood
294 | that the user who changes the contents of definitions files in the
295 | Library will not necessarily be able to recompile the application
296 | to use the modified definitions.)
297 |
298 | b) Use a suitable shared library mechanism for linking with the
299 | Library. A suitable mechanism is one that (1) uses at run time a
300 | copy of the library already present on the user's computer system,
301 | rather than copying library functions into the executable, and (2)
302 | will operate properly with a modified version of the library, if
303 | the user installs one, as long as the modified version is
304 | interface-compatible with the version that the work was made with.
305 |
306 | c) Accompany the work with a written offer, valid for at
307 | least three years, to give the same user the materials
308 | specified in Subsection 6a, above, for a charge no more
309 | than the cost of performing this distribution.
310 |
311 | d) If distribution of the work is made by offering access to copy
312 | from a designated place, offer equivalent access to copy the above
313 | specified materials from the same place.
314 |
315 | e) Verify that the user has already received a copy of these
316 | materials or that you have already sent this user a copy.
317 |
318 | For an executable, the required form of the "work that uses the
319 | Library" must include any data and utility programs needed for
320 | reproducing the executable from it. However, as a special exception,
321 | the materials to be distributed need not include anything that is
322 | normally distributed (in either source or binary form) with the major
323 | components (compiler, kernel, and so on) of the operating system on
324 | which the executable runs, unless that component itself accompanies
325 | the executable.
326 |
327 | It may happen that this requirement contradicts the license
328 | restrictions of other proprietary libraries that do not normally
329 | accompany the operating system. Such a contradiction means you cannot
330 | use both them and the Library together in an executable that you
331 | distribute.
332 |
333 | 7. You may place library facilities that are a work based on the
334 | Library side-by-side in a single library together with other library
335 | facilities not covered by this License, and distribute such a combined
336 | library, provided that the separate distribution of the work based on
337 | the Library and of the other library facilities is otherwise
338 | permitted, and provided that you do these two things:
339 |
340 | a) Accompany the combined library with a copy of the same work
341 | based on the Library, uncombined with any other library
342 | facilities. This must be distributed under the terms of the
343 | Sections above.
344 |
345 | b) Give prominent notice with the combined library of the fact
346 | that part of it is a work based on the Library, and explaining
347 | where to find the accompanying uncombined form of the same work.
348 |
349 | 8. You may not copy, modify, sublicense, link with, or distribute
350 | the Library except as expressly provided under this License. Any
351 | attempt otherwise to copy, modify, sublicense, link with, or
352 | distribute the Library is void, and will automatically terminate your
353 | rights under this License. However, parties who have received copies,
354 | or rights, from you under this License will not have their licenses
355 | terminated so long as such parties remain in full compliance.
356 |
357 | 9. You are not required to accept this License, since you have not
358 | signed it. However, nothing else grants you permission to modify or
359 | distribute the Library or its derivative works. These actions are
360 | prohibited by law if you do not accept this License. Therefore, by
361 | modifying or distributing the Library (or any work based on the
362 | Library), you indicate your acceptance of this License to do so, and
363 | all its terms and conditions for copying, distributing or modifying
364 | the Library or works based on it.
365 |
366 | 10. Each time you redistribute the Library (or any work based on the
367 | Library), the recipient automatically receives a license from the
368 | original licensor to copy, distribute, link with or modify the Library
369 | subject to these terms and conditions. You may not impose any further
370 | restrictions on the recipients' exercise of the rights granted herein.
371 | You are not responsible for enforcing compliance by third parties with
372 | this License.
373 |
374 | 11. If, as a consequence of a court judgment or allegation of patent
375 | infringement or for any other reason (not limited to patent issues),
376 | conditions are imposed on you (whether by court order, agreement or
377 | otherwise) that contradict the conditions of this License, they do not
378 | excuse you from the conditions of this License. If you cannot
379 | distribute so as to satisfy simultaneously your obligations under this
380 | License and any other pertinent obligations, then as a consequence you
381 | may not distribute the Library at all. For example, if a patent
382 | license would not permit royalty-free redistribution of the Library by
383 | all those who receive copies directly or indirectly through you, then
384 | the only way you could satisfy both it and this License would be to
385 | refrain entirely from distribution of the Library.
386 |
387 | If any portion of this section is held invalid or unenforceable under any
388 | particular circumstance, the balance of the section is intended to apply,
389 | and the section as a whole is intended to apply in other circumstances.
390 |
391 | It is not the purpose of this section to induce you to infringe any
392 | patents or other property right claims or to contest validity of any
393 | such claims; this section has the sole purpose of protecting the
394 | integrity of the free software distribution system which is
395 | implemented by public license practices. Many people have made
396 | generous contributions to the wide range of software distributed
397 | through that system in reliance on consistent application of that
398 | system; it is up to the author/donor to decide if he or she is willing
399 | to distribute software through any other system and a licensee cannot
400 | impose that choice.
401 |
402 | This section is intended to make thoroughly clear what is believed to
403 | be a consequence of the rest of this License.
404 |
405 | 12. If the distribution and/or use of the Library is restricted in
406 | certain countries either by patents or by copyrighted interfaces, the
407 | original copyright holder who places the Library under this License may add
408 | an explicit geographical distribution limitation excluding those countries,
409 | so that distribution is permitted only in or among countries not thus
410 | excluded. In such case, this License incorporates the limitation as if
411 | written in the body of this License.
412 |
413 | 13. The Free Software Foundation may publish revised and/or new
414 | versions of the Lesser General Public License from time to time.
415 | Such new versions will be similar in spirit to the present version,
416 | but may differ in detail to address new problems or concerns.
417 |
418 | Each version is given a distinguishing version number. If the Library
419 | specifies a version number of this License which applies to it and
420 | "any later version", you have the option of following the terms and
421 | conditions either of that version or of any later version published by
422 | the Free Software Foundation. If the Library does not specify a
423 | license version number, you may choose any version ever published by
424 | the Free Software Foundation.
425 |
426 | 14. If you wish to incorporate parts of the Library into other free
427 | programs whose distribution conditions are incompatible with these,
428 | write to the author to ask for permission. For software which is
429 | copyrighted by the Free Software Foundation, write to the Free
430 | Software Foundation; we sometimes make exceptions for this. Our
431 | decision will be guided by the two goals of preserving the free status
432 | of all derivatives of our free software and of promoting the sharing
433 | and reuse of software generally.
434 |
435 | NO WARRANTY
436 |
437 | 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
438 | WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
439 | EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
440 | OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
441 | KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
442 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
443 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
444 | LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
445 | THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
446 |
447 | 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
448 | WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
449 | AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
450 | FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
451 | CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
452 | LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
453 | RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
454 | FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
455 | SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
456 | DAMAGES.
457 |
458 | END OF TERMS AND CONDITIONS
459 |
460 | How to Apply These Terms to Your New Libraries
461 |
462 | If you develop a new library, and you want it to be of the greatest
463 | possible use to the public, we recommend making it free software that
464 | everyone can redistribute and change. You can do so by permitting
465 | redistribution under these terms (or, alternatively, under the terms of the
466 | ordinary General Public License).
467 |
468 | To apply these terms, attach the following notices to the library. It is
469 | safest to attach them to the start of each source file to most effectively
470 | convey the exclusion of warranty; and each file should have at least the
471 | "copyright" line and a pointer to where the full notice is found.
472 |
473 |
474 | Copyright (C)
475 |
476 | This library is free software; you can redistribute it and/or
477 | modify it under the terms of the GNU Lesser General Public
478 | License as published by the Free Software Foundation; either
479 | version 2.1 of the License, or (at your option) any later version.
480 |
481 | This library is distributed in the hope that it will be useful,
482 | but WITHOUT ANY WARRANTY; without even the implied warranty of
483 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
484 | Lesser General Public License for more details.
485 |
486 | You should have received a copy of the GNU Lesser General Public
487 | License along with this library; if not, write to the Free Software
488 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
489 | USA
490 |
491 | Also add information on how to contact you by electronic and paper mail.
492 |
493 | You should also get your employer (if you work as a programmer) or your
494 | school, if any, to sign a "copyright disclaimer" for the library, if
495 | necessary. Here is a sample; alter the names:
496 |
497 | Yoyodyne, Inc., hereby disclaims all copyright interest in the
498 | library `Frob' (a library for tweaking knobs) written by James Random
499 | Hacker.
500 |
501 | , 1 April 1990
502 | Ty Coon, President of Vice
503 |
504 | That's all there is to it!
505 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## 介绍
2 | 1. 完全使用Qt开发的二维地图,不依赖Qt外的其他东西
3 |
4 | 2. 最初是用在仿真模拟的GIS
5 |
6 | 3. 开发环境 VS2017+Qt5.12.8,VS至少在2013版本,Qt至少在5.6版本,VS工程文件自行修改
7 |
8 | 4. 模块:
9 | ```
10 | class GisViewer 外部窗口 QGraphicsView(使用者应当嵌入到QWidget中)
11 | |
12 | |--- GisLayerItem 地图管理图层 QGraphicsItem
13 | | |
14 | | |--- TitleLayer 瓦片图层
15 | | |
16 | | |--- RouteLayer 航线图层
17 | | |
18 | | |--- EntityLayer 实体图层(放飞机、坦克等实体)支持svg向量图标和军标切换
19 | | |
20 | | |--- DrawLayer 绘图层 (目前只有测距功能)
21 | |
22 | |--- MouseLonLatItem 经纬度图层
23 | |
24 | |--- GeoMath 地理计算(包括瓦片映射到Qt窗口)
25 | |
26 | |--- DataManager 地图上的数据管理
27 | |
28 | |--- Config 配置文件读取(在config.ini中,字段都有说明)
29 |
30 | class GisSignals 地图上的操作对外发出的信号
31 |
32 | ```
33 | 5. 瓦片目录结构(每个目录对应地图等级),瓦片支持`.mbtiles`文件、http接口、本地瓦片目录
34 |
35 | 
36 |
37 |
38 | 6. 这个版本针对单个实体的业务较多,所以一个实体对应一个item,由于Qt性能跟不上,支持的实体数量有限,最好不超过100个
39 |
40 | - - -
41 |
42 | 如果有大量实体的需求请联系作者邮箱975500206@qq.com,能够支持1w以上实体,同样完全是Qt开发
43 |
--------------------------------------------------------------------------------
/include/GisStruct.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #if defined(QT_VERSION) && defined(WIN32) && defined(_MSC_VER)
4 | # if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
5 | # pragma execution_character_set("UTF-8")
6 | # endif
7 | #endif
8 |
9 | #include
10 |
11 | //地图操作状态
12 | enum EnumMapMode
13 | {
14 | /* 仿真运行 */ SimRunMode,
15 | /* 移动地图 */ MoveMapMode,
16 | /* 绘制航线 */ DrawRouteLineMode,
17 | /* 测距 */ MeasureMode,
18 |
19 | };
20 |
21 | //地理坐标点
22 | struct GeoPoint
23 | {
24 | explicit GeoPoint(double lon = 0.0, double lat = 0.0, double alt = 0.0)
25 | : longitude(lon), latitude(lat), altitude(alt) { }
26 |
27 | //经纬高
28 | double longitude; // 经度 [-180, 180]
29 | double latitude; // 纬度 [-90, 90]
30 | double altitude; // 高度
31 | };
32 |
33 | //实体姿态
34 | struct Attitude
35 | {
36 | explicit Attitude(double _bearing = 0.0, double _pitch = 0.0, double _roll = 0.0)
37 | : bearing(_bearing), pitch(_pitch), roll(_roll) { }
38 |
39 | double bearing; //方位角 [0, 360] 正北为0度
40 | double pitch; //俯仰角 [-180, 180]
41 | double roll; //旋转角(翻滚角) [-180, 180]
42 | };
43 |
44 | //航线点数据
45 | //TODO 航线点除了经纬度,可能还有其他信息
46 | struct RoutePointInfo
47 | {
48 | RoutePointInfo() { }
49 | RoutePointInfo(const GeoPoint &p)
50 | : position(p) { }
51 |
52 | GeoPoint position; //地理坐标
53 |
54 | operator const GeoPoint &() const { return position; }
55 | };
56 |
57 | //颜色
58 | struct Color
59 | {
60 | explicit Color(unsigned char _r = 0, unsigned char _g = 0, unsigned char _b = 0, unsigned char _a = 255)
61 | : r(_r), g(_g), b(_b), a(_a) {}
62 | // [0-255]
63 | unsigned char r, g, b, a;
64 | };
65 |
66 | //航线
67 | //TODO 航线可能有名称, 距离信息
68 | struct RouteInfo
69 | {
70 | RouteInfo() : ID(0), isClose(false), color(255) { }
71 |
72 | std::string routeName; //航线名称
73 | long long ID; //航线id (唯一)
74 | Color color; //航线颜色 默认红色
75 | bool isClose; //首尾是否闭合
76 | std::vector points; //航线上的点
77 | };
78 |
79 |
80 | //扫描样式
81 | enum ScanStyle
82 | {
83 | /* 圆周扫描 */ CircleScan,
84 | /* 扇形扫描 */ SectorScan,
85 | };
86 |
87 | //扫描参数
88 | struct ScanParam
89 | {
90 | ScanParam() : scanAngleSize(6.), scanSpeed(6.), pitchAngleSize(0), radius(0), curBearing(0), scanStyle(CircleScan) { }
91 |
92 | std::string abilityType; //所在能力圈
93 |
94 | unsigned int radius; //扫描角的半径 单位:m
95 | float scanAngleSize; //扫描水平张角大小 单位: deg
96 | float pitchAngleSize; //俯仰张角大小
97 | float scanSpeed; //扫描速度 单位:deg/s
98 | float curBearing; //当前扫描光束相对实体的角度位置 (圆周扫描是方位角,上下扫描是俯仰角)
99 | ScanStyle scanStyle; //扫描样式
100 | Color scanColor; //颜色
101 | };
102 |
103 | // 实体单个能力圈参数
104 | // modify by gwk 2019-11-25 08:46:13
105 | // 修改前: 实体能力圈和扫描参数是分开的
106 | // 修改后: 实体能力圈参数包含扫描参数
107 | struct AbilityCircleParam
108 | {
109 | explicit AbilityCircleParam()
110 | : radius(0), startAngle(0), /*acID(0), */endAngle(0), minPitchAngle(0), maxPitchAngle(0)
111 | { }
112 |
113 | std::string abilityType; //能力类型 (一个实体 可能多种能力)
114 | //int acID; // id
115 | unsigned int radius; //半径 单位:m
116 | int startAngle; //起始角度 (相对于实体的方向角) 单位: deg (-180 ~ 180)
117 | int endAngle; //结束角度 (相对于实体的方向角)
118 |
119 | int minPitchAngle; //最小俯仰角 正前方为0,朝下为负 朝上为正
120 | int maxPitchAngle; //最大俯仰角张角
121 |
122 | Color circleColor; //圆的颜色
123 |
124 | ScanParam scanPatam; //扫描参数
125 | };
126 |
127 |
128 | //实体
129 | struct EntityInfo
130 | {
131 | explicit EntityInfo() : ID(0), nType(0), campID(0), speed(0), nPlatform(0){ }
132 |
133 | long long ID; //实体id (唯一)
134 | int campID; //阵营id
135 |
136 | float speed; //实体速度 单位:m/s
137 | Color color; //实体颜色
138 |
139 | std::string entityName; //实体型号(名字) 不唯一
140 |
141 | // 参见 三维 Data/config 文件夹中 CustomModelConfig.xml 文件
142 | int nPlatform; //平台 三维上用来标识海陆空等类型
143 | int nType; //实体型号标识 三维用来寻找对应模型
144 |
145 | std::string iconPath; // 二维实体svg图标路径
146 |
147 | GeoPoint position; //实体位置
148 | Attitude attitude; //实体姿态
149 |
150 | friend std::iostream & operator<< (std::iostream &in, const EntityInfo &a);
151 | friend std::iostream & operator>> (std::iostream &out, EntityInfo &a);
152 | };
153 |
154 | // 平台数据 包含实体和雷达信息
155 | struct PlatformData
156 | {
157 | PlatformData() {}
158 | explicit PlatformData(const EntityInfo & _entity) : entity(_entity) { }
159 |
160 | EntityInfo entity;
161 | std::unordered_map radarData;
162 | };
163 |
164 | // 序列化实体
165 | static std::iostream & operator<< (std::iostream &in, const EntityInfo &a)
166 | {
167 | in << a.ID << a.campID << a.speed << a.color.r << a.color.g << a.color.b << a.color.a << a.entityName \
168 | << a.nPlatform << a.nType << a.iconPath << a.position.longitude << a.position.latitude << a.position.altitude \
169 | << a.attitude.bearing << a.attitude.pitch << a.attitude.roll;
170 | return in;
171 | }
172 |
173 | static std::iostream & operator>> (std::iostream &out, EntityInfo &a)
174 | {
175 | out >> a.ID >> a.campID >> a.speed >> a.color.r >> a.color.g >> a.color.b >> a.color.a >> a.entityName \
176 | >> a.nPlatform >> a.nType >> a.iconPath >> a.position.longitude >> a.position.latitude >> a.position.altitude \
177 | >> a.attitude.bearing >> a.attitude.pitch >> a.attitude.roll;
178 | return out;
179 | }
180 |
--------------------------------------------------------------------------------
/include/Serialization.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iGwkang/QtGis/f3b89ad4ea2b6be0b8b07b46fea36cd47d2a6ecb/include/Serialization.h
--------------------------------------------------------------------------------
/png/20210725032515.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iGwkang/QtGis/f3b89ad4ea2b6be0b8b07b46fea36cd47d2a6ecb/png/20210725032515.png
--------------------------------------------------------------------------------