and
10 | # licensed under the MIT/X11 License. For more information, see
11 | # http://geographiclib.sourceforge.net/
12 | ######################################################################
13 |
14 | class Constants(object):
15 | """
16 | Constants describing the WGS84 ellipsoid
17 | """
18 |
19 | WGS84_a = 6378137.0 # meters
20 | """the equatorial radius in meters of the WGS84 ellipsoid in meters"""
21 | WGS84_f = 1/298.257223563
22 | """the flattening of the WGS84 ellipsoid, 1/298.257223563"""
23 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/geographiclib/geodesiccapability.py:
--------------------------------------------------------------------------------
1 | """geodesiccapability.py: capability constants for geodesic{,line}.py"""
2 | # geodesiccapability.py
3 | #
4 | # This gathers the capability constants need by geodesic.py and
5 | # geodesicline.py. See the documentation for the GeographicLib::Geodesic class
6 | # for more information at
7 | #
8 | # http://geographiclib.sourceforge.net/html/annotated.html
9 | #
10 | # Copyright (c) Charles Karney (2011-2014) and licensed
11 | # under the MIT/X11 License. For more information, see
12 | # http://geographiclib.sourceforge.net/
13 | ######################################################################
14 |
15 | class GeodesicCapability(object):
16 | """
17 | Capability constants shared between Geodesic and GeodesicLine.
18 | """
19 |
20 | CAP_NONE = 0
21 | CAP_C1 = 1 << 0
22 | CAP_C1p = 1 << 1
23 | CAP_C2 = 1 << 2
24 | CAP_C3 = 1 << 3
25 | CAP_C4 = 1 << 4
26 | CAP_ALL = 0x1F
27 | CAP_MASK = CAP_ALL
28 | OUT_ALL = 0x7F80
29 | OUT_MASK = 0xFF80 # Includes LONG_UNROLL
30 | EMPTY = 0
31 | LATITUDE = 1 << 7 | CAP_NONE
32 | LONGITUDE = 1 << 8 | CAP_C3
33 | AZIMUTH = 1 << 9 | CAP_NONE
34 | DISTANCE = 1 << 10 | CAP_C1
35 | STANDARD = LATITUDE | LONGITUDE | AZIMUTH | DISTANCE
36 | DISTANCE_IN = 1 << 11 | CAP_C1 | CAP_C1p
37 | REDUCEDLENGTH = 1 << 12 | CAP_C1 | CAP_C2
38 | GEODESICSCALE = 1 << 13 | CAP_C1 | CAP_C2
39 | AREA = 1 << 14 | CAP_C4
40 | LONG_UNROLL = 1 << 15
41 | ALL = OUT_ALL | CAP_ALL # Does not include LONG_UNROLL
42 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/geographiclib/geographiclib_LICENSE.txt:
--------------------------------------------------------------------------------
1 | The MIT License (MIT); this license applies to GeographicLib,
2 | versions 1.12 and later.
3 |
4 | Copyright (c) 2008-2016, Charles Karney
5 |
6 | Permission is hereby granted, free of charge, to any person
7 | obtaining a copy of this software and associated documentation
8 | files (the "Software"), to deal in the Software without
9 | restriction, including without limitation the rights to use, copy,
10 | modify, merge, publish, distribute, sublicense, and/or sell copies
11 | of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be
15 | included in all copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24 | DEALINGS IN THE SOFTWARE.
25 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/geographiclib/geomath.py:
--------------------------------------------------------------------------------
1 | """geomath.py: transcription of GeographicLib::Math class."""
2 | # geomath.py
3 | #
4 | # This is a rather literal translation of the GeographicLib::Math class to
5 | # python. See the documentation for the C++ class for more information at
6 | #
7 | # http://geographiclib.sourceforge.net/html/annotated.html
8 | #
9 | # Copyright (c) Charles Karney (2011-2016) and
10 | # licensed under the MIT/X11 License. For more information, see
11 | # http://geographiclib.sourceforge.net/
12 | ######################################################################
13 |
14 | import sys
15 | import math
16 |
17 | class Math(object):
18 | """
19 | Additional math routines for GeographicLib.
20 |
21 | This defines constants:
22 | epsilon, difference between 1 and the next bigger number
23 | digits, the number of digits in the fraction of a real number
24 | minval, minimum normalized positive number
25 | maxval, maximum finite number
26 | nan, not a number
27 | inf, infinity
28 | """
29 |
30 | digits = 53
31 | epsilon = math.pow(2.0, 1-digits)
32 | minval = math.pow(2.0, -1022)
33 | maxval = math.pow(2.0, 1023) * (2 - epsilon)
34 | inf = float("inf") if sys.version_info > (2, 6) else 2 * maxval
35 | nan = float("nan") if sys.version_info > (2, 6) else inf - inf
36 |
37 | def sq(x):
38 | """Square a number"""
39 |
40 | return x * x
41 | sq = staticmethod(sq)
42 |
43 | def cbrt(x):
44 | """Real cube root of a number"""
45 |
46 | y = math.pow(abs(x), 1/3.0)
47 | return y if x >= 0 else -y
48 | cbrt = staticmethod(cbrt)
49 |
50 | def log1p(x):
51 | """log(1 + x) accurate for small x (missing from python 2.5.2)"""
52 |
53 | if sys.version_info > (2, 6):
54 | return math.log1p(x)
55 |
56 | y = 1 + x
57 | z = y - 1
58 | # Here's the explanation for this magic: y = 1 + z, exactly, and z
59 | # approx x, thus log(y)/z (which is nearly constant near z = 0) returns
60 | # a good approximation to the true log(1 + x)/x. The multiplication x *
61 | # (log(y)/z) introduces little additional error.
62 | return x if z == 0 else x * math.log(y) / z
63 | log1p = staticmethod(log1p)
64 |
65 | def atanh(x):
66 | """atanh(x) (missing from python 2.5.2)"""
67 |
68 | if sys.version_info > (2, 6):
69 | return math.atanh(x)
70 |
71 | y = abs(x) # Enforce odd parity
72 | y = Math.log1p(2 * y/(1 - y))/2
73 | return -y if x < 0 else y
74 | atanh = staticmethod(atanh)
75 |
76 | def copysign(x, y):
77 | """return x with the sign of y (missing from python 2.5.2)"""
78 |
79 | if sys.version_info > (2, 6):
80 | return math.copysign(x, y)
81 |
82 | return math.fabs(x) * (-1 if y < 0 or (y == 0 and 1/y < 0) else 1)
83 | copysign = staticmethod(copysign)
84 |
85 | def norm(x, y):
86 | """Private: Normalize a two-vector."""
87 | r = math.hypot(x, y)
88 | return x/r, y/r
89 | norm = staticmethod(norm)
90 |
91 | def sum(u, v):
92 | """Error free transformation of a sum."""
93 | # Error free transformation of a sum. Note that t can be the same as one
94 | # of the first two arguments.
95 | s = u + v
96 | up = s - v
97 | vpp = s - up
98 | up -= u
99 | vpp -= v
100 | t = -(up + vpp)
101 | # u + v = s + t
102 | # = round(u + v) + t
103 | return s, t
104 | sum = staticmethod(sum)
105 |
106 | def polyval(N, p, s, x):
107 | """Evaluate a polynomial."""
108 | y = float(0 if N < 0 else p[s]) # make sure the returned value is a float
109 | while N > 0:
110 | N -= 1; s += 1
111 | y = y * x + p[s]
112 | return y
113 | polyval = staticmethod(polyval)
114 |
115 | def AngRound(x):
116 | """Private: Round an angle so that small values underflow to zero."""
117 | # The makes the smallest gap in x = 1/16 - nextafter(1/16, 0) = 1/2^57
118 | # for reals = 0.7 pm on the earth if x is an angle in degrees. (This
119 | # is about 1000 times more resolution than we get with angles around 90
120 | # degrees.) We use this to avoid having to deal with near singular
121 | # cases when x is non-zero but tiny (e.g., 1.0e-200).
122 | z = 1/16.0
123 | y = abs(x)
124 | # The compiler mustn't "simplify" z - (z - y) to y
125 | if y < z: y = z - (z - y)
126 | return 0.0 if x == 0 else (-y if x < 0 else y)
127 | AngRound = staticmethod(AngRound)
128 |
129 | def AngNormalize(x):
130 | """reduce angle to [-180,180)"""
131 |
132 | x = math.fmod(x, 360)
133 | return (x + 360 if x < -180 else
134 | (x if x < 180 else x - 360))
135 | AngNormalize = staticmethod(AngNormalize)
136 |
137 | def LatFix(x):
138 | """replace angles outside [-90,90] by NaN"""
139 |
140 | return Math.nan if abs(x) > 90 else x
141 | LatFix = staticmethod(LatFix)
142 |
143 | def AngDiff(x, y):
144 | """compute y - x and reduce to [-180,180] accurately"""
145 |
146 | d, t = Math.sum(Math.AngNormalize(x), Math.AngNormalize(-y))
147 | d = - Math.AngNormalize(d)
148 | return Math.sum(-180 if d == 180 and t < 0 else d, -t)
149 | AngDiff = staticmethod(AngDiff)
150 |
151 | def sincosd(x):
152 | """Compute sine and cosine of x in degrees."""
153 |
154 | r = math.fmod(x, 360)
155 | q = Math.nan if Math.isnan(r) else int(math.floor(r / 90 + 0.5))
156 | r -= 90 * q; r = math.radians(r)
157 | s = math.sin(r); c = math.cos(r)
158 | q = q % 4
159 | if q == 1:
160 | s, c = c, 0.0-s
161 | elif q == 2:
162 | s, c = 0.0-s, 0.0-c
163 | elif q == 3:
164 | s, c = 0.0-c, s
165 | return s, c
166 | sincosd = staticmethod(sincosd)
167 |
168 | def atan2d(y, x):
169 | """compute atan2(y, x) with the result in degrees"""
170 |
171 | if abs(y) > abs(x):
172 | q = 2; x, y = y, x
173 | else:
174 | q = 0
175 | if x < 0:
176 | q += 1; x = -x
177 | ang = math.degrees(math.atan2(y, x))
178 | if q == 1:
179 | ang = (180 if y > 0 else -180) - ang
180 | elif q == 2:
181 | ang = 90 - ang
182 | elif q == 3:
183 | ang = -90 + ang
184 | return ang
185 | atan2d = staticmethod(atan2d)
186 |
187 | def isfinite(x):
188 | """Test for finiteness"""
189 |
190 | return abs(x) <= Math.maxval
191 | isfinite = staticmethod(isfinite)
192 |
193 | def isnan(x):
194 | """Test if nan"""
195 |
196 | return math.isnan(x) if sys.version_info > (2, 6) else x != x
197 | isnan = staticmethod(isnan)
198 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/geographiclib/test/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 |
3 | test_geodesic: test the geodesic routines from GeographicLib
4 |
5 | Run these tests with one of
6 |
7 | python2 -m unittest -v geographiclib.test.test_geodesic
8 | python3 -m unittest -v geographiclib.test.test_geodesic
9 |
10 | executed in this directory's parent directory.
11 |
12 | """
13 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/help/Makefile:
--------------------------------------------------------------------------------
1 | # Makefile for Sphinx documentation
2 | #
3 |
4 | # You can set these variables from the command line.
5 | SPHINXOPTS =
6 | SPHINXBUILD = sphinx-build
7 | PAPER =
8 | BUILDDIR = build
9 |
10 | # Internal variables.
11 | PAPEROPT_a4 = -D latex_paper_size=a4
12 | PAPEROPT_letter = -D latex_paper_size=letter
13 | ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
14 |
15 | .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
16 |
17 | help:
18 | @echo "Please use \`make ' where is one of"
19 | @echo " html to make standalone HTML files"
20 | @echo " dirhtml to make HTML files named index.html in directories"
21 | @echo " singlehtml to make a single large HTML file"
22 | @echo " pickle to make pickle files"
23 | @echo " json to make JSON files"
24 | @echo " htmlhelp to make HTML files and a HTML help project"
25 | @echo " qthelp to make HTML files and a qthelp project"
26 | @echo " devhelp to make HTML files and a Devhelp project"
27 | @echo " epub to make an epub"
28 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
29 | @echo " latexpdf to make LaTeX files and run them through pdflatex"
30 | @echo " text to make text files"
31 | @echo " man to make manual pages"
32 | @echo " changes to make an overview of all changed/added/deprecated items"
33 | @echo " linkcheck to check all external links for integrity"
34 | @echo " doctest to run all doctests embedded in the documentation (if enabled)"
35 |
36 | clean:
37 | -rm -rf $(BUILDDIR)/*
38 |
39 | html:
40 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
41 | @echo
42 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
43 |
44 | dirhtml:
45 | $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
46 | @echo
47 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
48 |
49 | singlehtml:
50 | $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
51 | @echo
52 | @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
53 |
54 | pickle:
55 | $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
56 | @echo
57 | @echo "Build finished; now you can process the pickle files."
58 |
59 | json:
60 | $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
61 | @echo
62 | @echo "Build finished; now you can process the JSON files."
63 |
64 | htmlhelp:
65 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
66 | @echo
67 | @echo "Build finished; now you can run HTML Help Workshop with the" \
68 | ".hhp project file in $(BUILDDIR)/htmlhelp."
69 |
70 | qthelp:
71 | $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
72 | @echo
73 | @echo "Build finished; now you can run "qcollectiongenerator" with the" \
74 | ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
75 | @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/template_class.qhcp"
76 | @echo "To view the help file:"
77 | @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/template_class.qhc"
78 |
79 | devhelp:
80 | $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
81 | @echo
82 | @echo "Build finished."
83 | @echo "To view the help file:"
84 | @echo "# mkdir -p $$HOME/.local/share/devhelp/template_class"
85 | @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/template_class"
86 | @echo "# devhelp"
87 |
88 | epub:
89 | $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
90 | @echo
91 | @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
92 |
93 | latex:
94 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
95 | @echo
96 | @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
97 | @echo "Run \`make' in that directory to run these through (pdf)latex" \
98 | "(use \`make latexpdf' here to do that automatically)."
99 |
100 | latexpdf:
101 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
102 | @echo "Running LaTeX files through pdflatex..."
103 | make -C $(BUILDDIR)/latex all-pdf
104 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
105 |
106 | text:
107 | $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
108 | @echo
109 | @echo "Build finished. The text files are in $(BUILDDIR)/text."
110 |
111 | man:
112 | $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
113 | @echo
114 | @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
115 |
116 | changes:
117 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
118 | @echo
119 | @echo "The overview file is in $(BUILDDIR)/changes."
120 |
121 | linkcheck:
122 | $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
123 | @echo
124 | @echo "Link check complete; look for any errors in the above output " \
125 | "or in $(BUILDDIR)/linkcheck/output.txt."
126 |
127 | doctest:
128 | $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
129 | @echo "Testing of doctests in the sources finished, look at the " \
130 | "results in $(BUILDDIR)/doctest/output.txt."
131 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/help/make.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 |
3 | REM Command file for Sphinx documentation
4 |
5 | if "%SPHINXBUILD%" == "" (
6 | set SPHINXBUILD=sphinx-build
7 | )
8 | set BUILDDIR=build
9 | set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% source
10 | if NOT "%PAPER%" == "" (
11 | set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
12 | )
13 |
14 | if "%1" == "" goto help
15 |
16 | if "%1" == "help" (
17 | :help
18 | echo.Please use `make ^` where ^ is one of
19 | echo. html to make standalone HTML files
20 | echo. dirhtml to make HTML files named index.html in directories
21 | echo. singlehtml to make a single large HTML file
22 | echo. pickle to make pickle files
23 | echo. json to make JSON files
24 | echo. htmlhelp to make HTML files and a HTML help project
25 | echo. qthelp to make HTML files and a qthelp project
26 | echo. devhelp to make HTML files and a Devhelp project
27 | echo. epub to make an epub
28 | echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
29 | echo. text to make text files
30 | echo. man to make manual pages
31 | echo. changes to make an overview over all changed/added/deprecated items
32 | echo. linkcheck to check all external links for integrity
33 | echo. doctest to run all doctests embedded in the documentation if enabled
34 | goto end
35 | )
36 |
37 | if "%1" == "clean" (
38 | for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
39 | del /q /s %BUILDDIR%\*
40 | goto end
41 | )
42 |
43 | if "%1" == "html" (
44 | %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
45 | echo.
46 | echo.Build finished. The HTML pages are in %BUILDDIR%/html.
47 | goto end
48 | )
49 |
50 | if "%1" == "dirhtml" (
51 | %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
52 | echo.
53 | echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
54 | goto end
55 | )
56 |
57 | if "%1" == "singlehtml" (
58 | %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
59 | echo.
60 | echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
61 | goto end
62 | )
63 |
64 | if "%1" == "pickle" (
65 | %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
66 | echo.
67 | echo.Build finished; now you can process the pickle files.
68 | goto end
69 | )
70 |
71 | if "%1" == "json" (
72 | %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
73 | echo.
74 | echo.Build finished; now you can process the JSON files.
75 | goto end
76 | )
77 |
78 | if "%1" == "htmlhelp" (
79 | %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
80 | echo.
81 | echo.Build finished; now you can run HTML Help Workshop with the ^
82 | .hhp project file in %BUILDDIR%/htmlhelp.
83 | goto end
84 | )
85 |
86 | if "%1" == "qthelp" (
87 | %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
88 | echo.
89 | echo.Build finished; now you can run "qcollectiongenerator" with the ^
90 | .qhcp project file in %BUILDDIR%/qthelp, like this:
91 | echo.^> qcollectiongenerator %BUILDDIR%\qthelp\template_class.qhcp
92 | echo.To view the help file:
93 | echo.^> assistant -collectionFile %BUILDDIR%\qthelp\template_class.ghc
94 | goto end
95 | )
96 |
97 | if "%1" == "devhelp" (
98 | %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
99 | echo.
100 | echo.Build finished.
101 | goto end
102 | )
103 |
104 | if "%1" == "epub" (
105 | %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
106 | echo.
107 | echo.Build finished. The epub file is in %BUILDDIR%/epub.
108 | goto end
109 | )
110 |
111 | if "%1" == "latex" (
112 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
113 | echo.
114 | echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
115 | goto end
116 | )
117 |
118 | if "%1" == "text" (
119 | %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
120 | echo.
121 | echo.Build finished. The text files are in %BUILDDIR%/text.
122 | goto end
123 | )
124 |
125 | if "%1" == "man" (
126 | %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
127 | echo.
128 | echo.Build finished. The manual pages are in %BUILDDIR%/man.
129 | goto end
130 | )
131 |
132 | if "%1" == "changes" (
133 | %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
134 | echo.
135 | echo.The overview file is in %BUILDDIR%/changes.
136 | goto end
137 | )
138 |
139 | if "%1" == "linkcheck" (
140 | %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
141 | echo.
142 | echo.Link check complete; look for any errors in the above output ^
143 | or in %BUILDDIR%/linkcheck/output.txt.
144 | goto end
145 | )
146 |
147 | if "%1" == "doctest" (
148 | %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
149 | echo.
150 | echo.Testing of doctests in the sources finished, look at the ^
151 | results in %BUILDDIR%/doctest/output.txt.
152 | goto end
153 | )
154 |
155 | :end
156 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/help/source/conf.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | #
3 | # VideoGis documentation build configuration file, created by
4 | # sphinx-quickstart on Sun Feb 12 17:11:03 2012.
5 | #
6 | # This file is execfile()d with the current directory set to its containing dir.
7 | #
8 | # Note that not all possible configuration values are present in this
9 | # autogenerated file.
10 | #
11 | # All configuration values have a default; values that are commented out
12 | # serve to show the default.
13 |
14 | import sys, os
15 |
16 | # If extensions (or modules to document with autodoc) are in another directory,
17 | # add these directories to sys.path here. If the directory is relative to the
18 | # documentation root, use os.path.abspath to make it absolute, like shown here.
19 | #sys.path.insert(0, os.path.abspath('.'))
20 |
21 | # -- General configuration -----------------------------------------------------
22 |
23 | # If your documentation needs a minimal Sphinx version, state it here.
24 | #needs_sphinx = '1.0'
25 |
26 | # Add any Sphinx extension module names here, as strings. They can be extensions
27 | # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
28 | extensions = ['sphinx.ext.todo', 'sphinx.ext.pngmath', 'sphinx.ext.viewcode']
29 |
30 | # Add any paths that contain templates here, relative to this directory.
31 | templates_path = ['_templates']
32 |
33 | # The suffix of source filenames.
34 | source_suffix = '.rst'
35 |
36 | # The encoding of source files.
37 | #source_encoding = 'utf-8-sig'
38 |
39 | # The master toctree document.
40 | master_doc = 'index'
41 |
42 | # General information about the project.
43 | project = u'VideoGis'
44 | copyright = u'2013, Salvatore Agosta'
45 |
46 | # The version info for the project you're documenting, acts as replacement for
47 | # |version| and |release|, also used in various other places throughout the
48 | # built documents.
49 | #
50 | # The short X.Y version.
51 | version = '0.1'
52 | # The full version, including alpha/beta/rc tags.
53 | release = '0.1'
54 |
55 | # The language for content autogenerated by Sphinx. Refer to documentation
56 | # for a list of supported languages.
57 | #language = None
58 |
59 | # There are two options for replacing |today|: either, you set today to some
60 | # non-false value, then it is used:
61 | #today = ''
62 | # Else, today_fmt is used as the format for a strftime call.
63 | #today_fmt = '%B %d, %Y'
64 |
65 | # List of patterns, relative to source directory, that match files and
66 | # directories to ignore when looking for source files.
67 | exclude_patterns = []
68 |
69 | # The reST default role (used for this markup: `text`) to use for all documents.
70 | #default_role = None
71 |
72 | # If true, '()' will be appended to :func: etc. cross-reference text.
73 | #add_function_parentheses = True
74 |
75 | # If true, the current module name will be prepended to all description
76 | # unit titles (such as .. function::).
77 | #add_TemplateModuleNames = True
78 |
79 | # If true, sectionauthor and moduleauthor directives will be shown in the
80 | # output. They are ignored by default.
81 | #show_authors = False
82 |
83 | # The name of the Pygments (syntax highlighting) style to use.
84 | pygments_style = 'sphinx'
85 |
86 | # A list of ignored prefixes for module index sorting.
87 | #modindex_common_prefix = []
88 |
89 |
90 | # -- Options for HTML output ---------------------------------------------------
91 |
92 | # The theme to use for HTML and HTML Help pages. See the documentation for
93 | # a list of builtin themes.
94 | html_theme = 'default'
95 |
96 | # Theme options are theme-specific and customize the look and feel of a theme
97 | # further. For a list of options available for each theme, see the
98 | # documentation.
99 | #html_theme_options = {}
100 |
101 | # Add any paths that contain custom themes here, relative to this directory.
102 | #html_theme_path = []
103 |
104 | # The name for this set of Sphinx documents. If None, it defaults to
105 | # " v documentation".
106 | #html_title = None
107 |
108 | # A shorter title for the navigation bar. Default is the same as html_title.
109 | #html_short_title = None
110 |
111 | # The name of an image file (relative to this directory) to place at the top
112 | # of the sidebar.
113 | #html_logo = None
114 |
115 | # The name of an image file (within the static path) to use as favicon of the
116 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
117 | # pixels large.
118 | #html_favicon = None
119 |
120 | # Add any paths that contain custom static files (such as style sheets) here,
121 | # relative to this directory. They are copied after the builtin static files,
122 | # so a file named "default.css" will overwrite the builtin "default.css".
123 | html_static_path = ['_static']
124 |
125 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
126 | # using the given strftime format.
127 | #html_last_updated_fmt = '%b %d, %Y'
128 |
129 | # If true, SmartyPants will be used to convert quotes and dashes to
130 | # typographically correct entities.
131 | #html_use_smartypants = True
132 |
133 | # Custom sidebar templates, maps document names to template names.
134 | #html_sidebars = {}
135 |
136 | # Additional templates that should be rendered to pages, maps page names to
137 | # template names.
138 | #html_additional_pages = {}
139 |
140 | # If false, no module index is generated.
141 | #html_domain_indices = True
142 |
143 | # If false, no index is generated.
144 | #html_use_index = True
145 |
146 | # If true, the index is split into individual pages for each letter.
147 | #html_split_index = False
148 |
149 | # If true, links to the reST sources are added to the pages.
150 | #html_show_sourcelink = True
151 |
152 | # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
153 | #html_show_sphinx = True
154 |
155 | # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
156 | #html_show_copyright = True
157 |
158 | # If true, an OpenSearch description file will be output, and all pages will
159 | # contain a tag referring to it. The value of this option must be the
160 | # base URL from which the finished HTML is served.
161 | #html_use_opensearch = ''
162 |
163 | # This is the file name suffix for HTML files (e.g. ".xhtml").
164 | #html_file_suffix = None
165 |
166 | # Output file base name for HTML help builder.
167 | htmlhelp_basename = 'TemplateClassdoc'
168 |
169 |
170 | # -- Options for LaTeX output --------------------------------------------------
171 |
172 | # The paper size ('letter' or 'a4').
173 | #latex_paper_size = 'letter'
174 |
175 | # The font size ('10pt', '11pt' or '12pt').
176 | #latex_font_size = '10pt'
177 |
178 | # Grouping the document tree into LaTeX files. List of tuples
179 | # (source start file, target name, title, author, documentclass [howto/manual]).
180 | latex_documents = [
181 | ('index', 'VideoGis.tex', u'VideoGis Documentation',
182 | u'Salvatore Agosta', 'manual'),
183 | ]
184 |
185 | # The name of an image file (relative to this directory) to place at the top of
186 | # the title page.
187 | #latex_logo = None
188 |
189 | # For "manual" documents, if this is true, then toplevel headings are parts,
190 | # not chapters.
191 | #latex_use_parts = False
192 |
193 | # If true, show page references after internal links.
194 | #latex_show_pagerefs = False
195 |
196 | # If true, show URL addresses after external links.
197 | #latex_show_urls = False
198 |
199 | # Additional stuff for the LaTeX preamble.
200 | #latex_preamble = ''
201 |
202 | # Documents to append as an appendix to all manuals.
203 | #latex_appendices = []
204 |
205 | # If false, no module index is generated.
206 | #latex_domain_indices = True
207 |
208 |
209 | # -- Options for manual page output --------------------------------------------
210 |
211 | # One entry per manual page. List of tuples
212 | # (source start file, name, description, authors, manual section).
213 | man_pages = [
214 | ('index', 'TemplateClass', u'VideoGis Documentation',
215 | [u'Salvatore Agosta'], 1)
216 | ]
217 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/help/source/index.rst:
--------------------------------------------------------------------------------
1 | .. VideoGis documentation master file, created by
2 | sphinx-quickstart on Sun Feb 12 17:11:03 2012.
3 | You can adapt this file completely to your liking, but it should at least
4 | contain the root `toctree` directive.
5 |
6 | Welcome to VideoGis's documentation!
7 | ============================================
8 |
9 | Contents:
10 |
11 | .. toctree::
12 | :maxdepth: 2
13 |
14 | Indices and tables
15 | ==================
16 |
17 | * :ref:`genindex`
18 | * :ref:`modindex`
19 | * :ref:`search`
20 |
21 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/i18n/af.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | @default
5 |
6 |
7 | Good morning
8 | Goeie more
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/icon.png
--------------------------------------------------------------------------------
/Video_UAV_Tracker/iconNewTabEditorConsole.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/iconNewTabEditorConsole.png
--------------------------------------------------------------------------------
/Video_UAV_Tracker/mIconFormSelect.svg:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/metadata.txt:
--------------------------------------------------------------------------------
1 | # This file contains metadata for your plugin. Since
2 | # version 2.0 of QGIS this is the proper way to supply
3 | # information about a plugin. The old method of
4 | # embedding metadata in __init__.py will
5 | # is no longer supported since version 2.0.
6 |
7 | # This file should be included when you package your plugin.# Mandatory items:
8 |
9 | [general]
10 | name=Video Uav Tracker
11 | qgisMinimumVersion=2.99
12 | qgisMaximumVersion=3.99
13 | description= Replay a video in sync with a gps track displayed on the map (3d OPTIONS with 'panda3d' module installed)
14 | version=2.1
15 | author=Salvatore Agosta
16 | email=sagost@katamail.com
17 |
18 | about= see README file in repository for instructions and details
19 |
20 | tracker=https://github.com/sagost/Video_UAV_Tracker-3D/issues
21 | repository=https://github.com/sagost/Video_UAV_Tracker-3D/
22 | # End of mandatory metadata
23 |
24 | # Recommended items:
25 |
26 | # Uncomment the following line and add your changelog:
27 | # changelog=
28 |
29 | # Tags are comma separated with spaces allowed
30 | tags=python,3D,uav,drone,direct georefencing, video,mosaic,photogrammetry,database,inspection,georeferenced video,rov,thermographic video
31 |
32 | homepage=https://github.com/sagost/Video_UAV_Tracker-3D/
33 | category=Plugins
34 | icon=icon.png
35 | # experimental flag
36 | experimental=False
37 |
38 | # deprecated flag (applies to the whole plugin, not just a single version)
39 | deprecated=False
40 |
41 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/pb_tool.cfg:
--------------------------------------------------------------------------------
1 | #/***************************************************************************
2 | # VideoGis
3 | #
4 | # Configuration file for plugin builder tool (pb_tool)
5 | # -------------------
6 | # begin : 2017-02-13
7 | # copyright : (C) 2017 by Salvatore Agosta
8 | # email : sagost@katamail.com
9 | # ***************************************************************************/
10 | #
11 | #/***************************************************************************
12 | # * *
13 | # * This program is free software; you can redistribute it and/or modify *
14 | # * it under the terms of the GNU General Public License as published by *
15 | # * the Free Software Foundation; either version 2 of the License, or *
16 | # * (at your option) any later version. *
17 | # * *
18 | # ***************************************************************************/
19 | #
20 | #
21 | # You can install pb_tool using:
22 | # pip install http://geoapt.net/files/pb_tool.zip
23 | #
24 | # Consider doing your development (and install of pb_tool) in a virtualenv.
25 | #
26 | # For details on setting up and using pb_tool, see:
27 | # http://spatialgalaxy.net/qgis-plugin-development-with-pb_tool
28 | #
29 | # Issues and pull requests here:
30 | # https://github.com/g-sherman/plugin_build_tool:
31 | #
32 | # Sane defaults for your plugin generated by the Plugin Builder are
33 | # already set below.
34 | #
35 | # As you add Python source files and UI files to your plugin, add
36 | # them to the appropriate [files] section below.
37 |
38 | [plugin]
39 | # Name of the plugin. This is the name of the directory that will
40 | # be created in .qgis2/python/plugins
41 | name: Video_UAV_Tracker
42 |
43 | [files]
44 | # Python files that should be deployed with the plugin
45 | python_files: __init__.py VideoGis.py VideoGis_dockwidget.py
46 |
47 | # The main dialog file that is loaded (not compiled)
48 | main_dialog: VideoGis_dockwidget_base.ui
49 |
50 | # Other ui files for dialogs you create (these will be compiled)
51 | compiled_ui_files:
52 |
53 | # Resource file(s) that will be compiled
54 | resource_files: resources.qrc
55 |
56 | # Other files required for the plugin
57 | extras: metadata.txt icon.png
58 |
59 | # Other directories to be deployed with the plugin.
60 | # These must be subdirectories under the plugin directory
61 | extra_dirs:
62 |
63 | # ISO code(s) for any locales (translations), separated by spaces.
64 | # Corresponding .ts files must exist in the i18n directory
65 | locales:
66 |
67 | [help]
68 | # the built help directory that should be deployed with the plugin
69 | dir: help/build/html
70 | # the name of the directory to target in the deployed plugin
71 | target: help
72 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/plugin_upload.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # coding=utf-8
3 | """This script uploads a plugin package on the server.
4 | Authors: A. Pasotti, V. Picavet
5 | git sha : $TemplateVCSFormat
6 | """
7 |
8 | import sys
9 | import getpass
10 | import xmlrpc.client
11 | from optparse import OptionParser
12 |
13 | # Configuration
14 | PROTOCOL = 'http'
15 | SERVER = 'plugins.qgis.org'
16 | PORT = '80'
17 | ENDPOINT = '/plugins/RPC2/'
18 | VERBOSE = False
19 |
20 |
21 | def main(parameters, arguments):
22 | """Main entry point.
23 |
24 | :param parameters: Command line parameters.
25 | :param arguments: Command line arguments.
26 | """
27 | address = "%s://%s:%s@%s:%s%s" % (
28 | PROTOCOL,
29 | parameters.username,
30 | parameters.password,
31 | parameters.server,
32 | parameters.port,
33 | ENDPOINT)
34 | print("Connecting to: %s" % hide_password(address))
35 |
36 | server = xmlrpc.client.ServerProxy(address, verbose=VERBOSE)
37 |
38 | try:
39 | plugin_id, version_id = server.plugin.upload(
40 | xmlrpc.client.Binary(open(arguments[0]).read()))
41 | print("Plugin ID: %s" % plugin_id)
42 | print("Version ID: %s" % version_id)
43 | except xmlrpc.client.ProtocolError as err:
44 | print("A protocol error occurred")
45 | print("URL: %s" % hide_password(err.url, 0))
46 | print("HTTP/HTTPS headers: %s" % err.headers)
47 | print("Error code: %d" % err.errcode)
48 | print("Error message: %s" % err.errmsg)
49 | except xmlrpc.client.Fault as err:
50 | print("A fault occurred")
51 | print("Fault code: %d" % err.faultCode)
52 | print("Fault string: %s" % err.faultString)
53 |
54 |
55 | def hide_password(url, start=6):
56 | """Returns the http url with password part replaced with '*'.
57 |
58 | :param url: URL to upload the plugin to.
59 | :type url: str
60 |
61 | :param start: Position of start of password.
62 | :type start: int
63 | """
64 | start_position = url.find(':', start) + 1
65 | end_position = url.find('@')
66 | return "%s%s%s" % (
67 | url[:start_position],
68 | '*' * (end_position - start_position),
69 | url[end_position:])
70 |
71 |
72 | if __name__ == "__main__":
73 | parser = OptionParser(usage="%prog [options] plugin.zip")
74 | parser.add_option(
75 | "-w", "--password", dest="password",
76 | help="Password for plugin site", metavar="******")
77 | parser.add_option(
78 | "-u", "--username", dest="username",
79 | help="Username of plugin site", metavar="user")
80 | parser.add_option(
81 | "-p", "--port", dest="port",
82 | help="Server port to connect to", metavar="80")
83 | parser.add_option(
84 | "-s", "--server", dest="server",
85 | help="Specify server name", metavar="plugins.qgis.org")
86 | options, args = parser.parse_args()
87 | if len(args) != 1:
88 | print("Please specify zip file.\n")
89 | parser.print_help()
90 | sys.exit(1)
91 | if not options.server:
92 | options.server = SERVER
93 | if not options.port:
94 | options.port = PORT
95 | if not options.username:
96 | # interactive mode
97 | username = getpass.getuser()
98 | print("Please enter user name [%s] :" % username, end=' ')
99 | res = input()
100 | if res != "":
101 | options.username = res
102 | else:
103 | options.username = username
104 | if not options.password:
105 | # interactive mode
106 | options.password = getpass.getpass()
107 | main(options, args)
108 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/pylintrc:
--------------------------------------------------------------------------------
1 | [MASTER]
2 |
3 | # Specify a configuration file.
4 | #rcfile=
5 |
6 | # Python code to execute, usually for sys.path manipulation such as
7 | # pygtk.require().
8 | #init-hook=
9 |
10 | # Profiled execution.
11 | profile=no
12 |
13 | # Add files or directories to the blacklist. They should be base names, not
14 | # paths.
15 | ignore=CVS
16 |
17 | # Pickle collected data for later comparisons.
18 | persistent=yes
19 |
20 | # List of plugins (as comma separated values of python modules names) to load,
21 | # usually to register additional checkers.
22 | load-plugins=
23 |
24 |
25 | [MESSAGES CONTROL]
26 |
27 | # Enable the message, report, category or checker with the given id(s). You can
28 | # either give multiple identifier separated by comma (,) or put this option
29 | # multiple time. See also the "--disable" option for examples.
30 | #enable=
31 |
32 | # Disable the message, report, category or checker with the given id(s). You
33 | # can either give multiple identifiers separated by comma (,) or put this
34 | # option multiple times (only on the command line, not in the configuration
35 | # file where it should appear only once).You can also use "--disable=all" to
36 | # disable everything first and then reenable specific checks. For example, if
37 | # you want to run only the similarities checker, you can use "--disable=all
38 | # --enable=similarities". If you want to run only the classes checker, but have
39 | # no Warning level messages displayed, use"--disable=all --enable=classes
40 | # --disable=W"
41 | # see http://stackoverflow.com/questions/21487025/pylint-locally-defined-disables-still-give-warnings-how-to-suppress-them
42 | disable=locally-disabled,C0103
43 |
44 |
45 | [REPORTS]
46 |
47 | # Set the output format. Available formats are text, parseable, colorized, msvs
48 | # (visual studio) and html. You can also give a reporter class, eg
49 | # mypackage.mymodule.MyReporterClass.
50 | output-format=text
51 |
52 | # Put messages in a separate file for each module / package specified on the
53 | # command line instead of printing them on stdout. Reports (if any) will be
54 | # written in a file name "pylint_global.[txt|html]".
55 | files-output=no
56 |
57 | # Tells whether to display a full report or only the messages
58 | reports=yes
59 |
60 | # Python expression which should return a note less than 10 (10 is the highest
61 | # note). You have access to the variables errors warning, statement which
62 | # respectively contain the number of errors / warnings messages and the total
63 | # number of statements analyzed. This is used by the global evaluation report
64 | # (RP0004).
65 | evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
66 |
67 | # Add a comment according to your evaluation note. This is used by the global
68 | # evaluation report (RP0004).
69 | comment=no
70 |
71 | # Template used to display messages. This is a python new-style format string
72 | # used to format the message information. See doc for all details
73 | #msg-template=
74 |
75 |
76 | [BASIC]
77 |
78 | # Required attributes for module, separated by a comma
79 | required-attributes=
80 |
81 | # List of builtins function names that should not be used, separated by a comma
82 | bad-functions=map,filter,apply,input
83 |
84 | # Regular expression which should only match correct module names
85 | module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
86 |
87 | # Regular expression which should only match correct module level names
88 | const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
89 |
90 | # Regular expression which should only match correct class names
91 | class-rgx=[A-Z_][a-zA-Z0-9]+$
92 |
93 | # Regular expression which should only match correct function names
94 | function-rgx=[a-z_][a-z0-9_]{2,30}$
95 |
96 | # Regular expression which should only match correct method names
97 | method-rgx=[a-z_][a-z0-9_]{2,30}$
98 |
99 | # Regular expression which should only match correct instance attribute names
100 | attr-rgx=[a-z_][a-z0-9_]{2,30}$
101 |
102 | # Regular expression which should only match correct argument names
103 | argument-rgx=[a-z_][a-z0-9_]{2,30}$
104 |
105 | # Regular expression which should only match correct variable names
106 | variable-rgx=[a-z_][a-z0-9_]{2,30}$
107 |
108 | # Regular expression which should only match correct attribute names in class
109 | # bodies
110 | class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
111 |
112 | # Regular expression which should only match correct list comprehension /
113 | # generator expression variable names
114 | inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
115 |
116 | # Good variable names which should always be accepted, separated by a comma
117 | good-names=i,j,k,ex,Run,_
118 |
119 | # Bad variable names which should always be refused, separated by a comma
120 | bad-names=foo,bar,baz,toto,tutu,tata
121 |
122 | # Regular expression which should only match function or class names that do
123 | # not require a docstring.
124 | no-docstring-rgx=__.*__
125 |
126 | # Minimum line length for functions/classes that require docstrings, shorter
127 | # ones are exempt.
128 | docstring-min-length=-1
129 |
130 |
131 | [MISCELLANEOUS]
132 |
133 | # List of note tags to take in consideration, separated by a comma.
134 | notes=FIXME,XXX,TODO
135 |
136 |
137 | [TYPECHECK]
138 |
139 | # Tells whether missing members accessed in mixin class should be ignored. A
140 | # mixin class is detected if its name ends with "mixin" (case insensitive).
141 | ignore-mixin-members=yes
142 |
143 | # List of classes names for which member attributes should not be checked
144 | # (useful for classes with attributes dynamically set).
145 | ignored-classes=SQLObject
146 |
147 | # When zope mode is activated, add a predefined set of Zope acquired attributes
148 | # to generated-members.
149 | zope=no
150 |
151 | # List of members which are set dynamically and missed by pylint inference
152 | # system, and so shouldn't trigger E0201 when accessed. Python regular
153 | # expressions are accepted.
154 | generated-members=REQUEST,acl_users,aq_parent
155 |
156 |
157 | [VARIABLES]
158 |
159 | # Tells whether we should check for unused import in __init__ files.
160 | init-import=no
161 |
162 | # A regular expression matching the beginning of the name of dummy variables
163 | # (i.e. not used).
164 | dummy-variables-rgx=_$|dummy
165 |
166 | # List of additional names supposed to be defined in builtins. Remember that
167 | # you should avoid to define new builtins when possible.
168 | additional-builtins=
169 |
170 |
171 | [FORMAT]
172 |
173 | # Maximum number of characters on a single line.
174 | max-line-length=80
175 |
176 | # Regexp for a line that is allowed to be longer than the limit.
177 | ignore-long-lines=^\s*(# )??$
178 |
179 | # Allow the body of an if to be on the same line as the test if there is no
180 | # else.
181 | single-line-if-stmt=no
182 |
183 | # List of optional constructs for which whitespace checking is disabled
184 | no-space-check=trailing-comma,dict-separator
185 |
186 | # Maximum number of lines in a module
187 | max-module-lines=1000
188 |
189 | # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
190 | # tab).
191 | indent-string=' '
192 |
193 |
194 | [SIMILARITIES]
195 |
196 | # Minimum lines number of a similarity.
197 | min-similarity-lines=4
198 |
199 | # Ignore comments when computing similarities.
200 | ignore-comments=yes
201 |
202 | # Ignore docstrings when computing similarities.
203 | ignore-docstrings=yes
204 |
205 | # Ignore imports when computing similarities.
206 | ignore-imports=no
207 |
208 |
209 | [IMPORTS]
210 |
211 | # Deprecated modules which should not be used, separated by a comma
212 | deprecated-modules=regsub,TERMIOS,Bastion,rexec
213 |
214 | # Create a graph of every (i.e. internal and external) dependencies in the
215 | # given file (report RP0402 must not be disabled)
216 | import-graph=
217 |
218 | # Create a graph of external dependencies in the given file (report RP0402 must
219 | # not be disabled)
220 | ext-import-graph=
221 |
222 | # Create a graph of internal dependencies in the given file (report RP0402 must
223 | # not be disabled)
224 | int-import-graph=
225 |
226 |
227 | [DESIGN]
228 |
229 | # Maximum number of arguments for function / method
230 | max-args=5
231 |
232 | # Argument names that match this expression will be ignored. Default to name
233 | # with leading underscore
234 | ignored-argument-names=_.*
235 |
236 | # Maximum number of locals for function / method body
237 | max-locals=15
238 |
239 | # Maximum number of return / yield for function / method body
240 | max-returns=6
241 |
242 | # Maximum number of branch for function / method body
243 | max-branches=12
244 |
245 | # Maximum number of statements in function / method body
246 | max-statements=50
247 |
248 | # Maximum number of parents for a class (see R0901).
249 | max-parents=7
250 |
251 | # Maximum number of attributes for a class (see R0902).
252 | max-attributes=7
253 |
254 | # Minimum number of public methods for a class (see R0903).
255 | min-public-methods=2
256 |
257 | # Maximum number of public methods for a class (see R0904).
258 | max-public-methods=20
259 |
260 |
261 | [CLASSES]
262 |
263 | # List of interface methods to ignore, separated by a comma. This is used for
264 | # instance to not check methods defines in Zope's Interface base class.
265 | ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
266 |
267 | # List of method names used to declare (i.e. assign) instance attributes.
268 | defining-attr-methods=__init__,__new__,setUp
269 |
270 | # List of valid names for the first argument in a class method.
271 | valid-classmethod-first-arg=cls
272 |
273 | # List of valid names for the first argument in a metaclass class method.
274 | valid-metaclass-classmethod-first-arg=mcs
275 |
276 |
277 | [EXCEPTIONS]
278 |
279 | # Exceptions that will emit a warning when being caught. Defaults to
280 | # "Exception"
281 | overgeneral-exceptions=Exception
282 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/resources.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | iconNewTabEditorConsole.png
4 | mIconFormSelect.svg
5 | icon.png
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/scripts/compile-strings.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | LRELEASE=$1
3 | LOCALES=$2
4 |
5 |
6 | for LOCALE in ${LOCALES}
7 | do
8 | echo "Processing: ${LOCALE}.ts"
9 | # Note we don't use pylupdate with qt .pro file approach as it is flakey
10 | # about what is made available.
11 | $LRELEASE i18n/${LOCALE}.ts
12 | done
13 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/scripts/run-env-linux.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | QGIS_PREFIX_PATH=/usr/local/qgis-2.0
4 | if [ -n "$1" ]; then
5 | QGIS_PREFIX_PATH=$1
6 | fi
7 |
8 | echo ${QGIS_PREFIX_PATH}
9 |
10 |
11 | export QGIS_PREFIX_PATH=${QGIS_PREFIX_PATH}
12 | export QGIS_PATH=${QGIS_PREFIX_PATH}
13 | export LD_LIBRARY_PATH=${QGIS_PREFIX_PATH}/lib
14 | export PYTHONPATH=${QGIS_PREFIX_PATH}/share/qgis/python:${QGIS_PREFIX_PATH}/share/qgis/python/plugins:${PYTHONPATH}
15 |
16 | echo "QGIS PATH: $QGIS_PREFIX_PATH"
17 | export QGIS_DEBUG=0
18 | export QGIS_LOG_FILE=/tmp/inasafe/realtime/logs/qgis.log
19 |
20 | export PATH=${QGIS_PREFIX_PATH}/bin:$PATH
21 |
22 | echo "This script is intended to be sourced to set up your shell to"
23 | echo "use a QGIS 2.0 built in $QGIS_PREFIX_PATH"
24 | echo
25 | echo "To use it do:"
26 | echo "source $BASH_SOURCE /your/optional/install/path"
27 | echo
28 | echo "Then use the make file supplied here e.g. make guitest"
29 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/scripts/update-strings.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | LOCALES=$*
3 |
4 | # Get newest .py files so we don't update strings unnecessarily
5 |
6 | CHANGED_FILES=0
7 | PYTHON_FILES=`find . -regex ".*\(ui\|py\)$" -type f`
8 | for PYTHON_FILE in $PYTHON_FILES
9 | do
10 | CHANGED=$(stat -c %Y $PYTHON_FILE)
11 | if [ ${CHANGED} -gt ${CHANGED_FILES} ]
12 | then
13 | CHANGED_FILES=${CHANGED}
14 | fi
15 | done
16 |
17 | # Qt translation stuff
18 | # for .ts file
19 | UPDATE=false
20 | for LOCALE in ${LOCALES}
21 | do
22 | TRANSLATION_FILE="i18n/$LOCALE.ts"
23 | if [ ! -f ${TRANSLATION_FILE} ]
24 | then
25 | # Force translation string collection as we have a new language file
26 | touch ${TRANSLATION_FILE}
27 | UPDATE=true
28 | break
29 | fi
30 |
31 | MODIFICATION_TIME=$(stat -c %Y ${TRANSLATION_FILE})
32 | if [ ${CHANGED_FILES} -gt ${MODIFICATION_TIME} ]
33 | then
34 | # Force translation string collection as a .py file has been updated
35 | UPDATE=true
36 | break
37 | fi
38 | done
39 |
40 | if [ ${UPDATE} == true ]
41 | # retrieve all python files
42 | then
43 | print ${PYTHON_FILES}
44 | # update .ts
45 | echo "Please provide translations by editing the translation files below:"
46 | for LOCALE in ${LOCALES}
47 | do
48 | echo "i18n/"${LOCALE}".ts"
49 | # Note we don't use pylupdate with qt .pro file approach as it is flakey
50 | # about what is made available.
51 | pylupdate4 -noobsolete ${PYTHON_FILES} -ts i18n/${LOCALE}.ts
52 | done
53 | else
54 | echo "No need to edit any translation files (.ts) because no python files"
55 | echo "has been updated since the last update translation. "
56 | fi
57 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/tableManagerUiClone.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 |
4 |
5 | from PyQt5 import QtCore, QtGui, QtWidgets
6 |
7 | class Ui_Clone(object):
8 | def setupUi(self, Clone):
9 | Clone.setObjectName("Clone")
10 | Clone.resize(375, 210)
11 | self.gridlayout = QtWidgets.QGridLayout(Clone)
12 | self.gridlayout.setObjectName("gridlayout")
13 | self.vboxlayout = QtWidgets.QVBoxLayout()
14 | self.vboxlayout.setObjectName("vboxlayout")
15 | spacerItem = QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.MinimumExpanding)
16 | self.vboxlayout.addItem(spacerItem)
17 | self.label = QtWidgets.QLabel(Clone)
18 | sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
19 | sizePolicy.setHorizontalStretch(0)
20 | sizePolicy.setVerticalStretch(0)
21 | sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
22 | self.label.setSizePolicy(sizePolicy)
23 | self.label.setObjectName("label")
24 | self.vboxlayout.addWidget(self.label)
25 | self.lineDsn = QtWidgets.QLineEdit(Clone)
26 | self.lineDsn.setMouseTracking(False)
27 | self.lineDsn.setInputMask("")
28 | self.lineDsn.setMaxLength(10)
29 | self.lineDsn.setFrame(True)
30 | self.lineDsn.setObjectName("lineDsn")
31 | self.vboxlayout.addWidget(self.lineDsn)
32 | self.label_3 = QtWidgets.QLabel(Clone)
33 | self.label_3.setObjectName("label_3")
34 | self.vboxlayout.addWidget(self.label_3)
35 | self.comboDsn = QtWidgets.QComboBox(Clone)
36 | self.comboDsn.setObjectName("comboDsn")
37 | self.vboxlayout.addWidget(self.comboDsn)
38 | self.gridlayout.addLayout(self.vboxlayout, 0, 0, 1, 1)
39 | self.buttonBox = QtWidgets.QDialogButtonBox(Clone)
40 | self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
41 | self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
42 | self.buttonBox.setCenterButtons(True)
43 | self.buttonBox.setObjectName("buttonBox")
44 | self.gridlayout.addWidget(self.buttonBox, 2, 0, 1, 1)
45 | spacerItem1 = QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.MinimumExpanding)
46 | self.gridlayout.addItem(spacerItem1, 1, 0, 1, 1)
47 |
48 | self.retranslateUi(Clone)
49 | self.buttonBox.accepted.connect(Clone.accept)
50 | self.buttonBox.rejected.connect(Clone.reject)
51 | QtCore.QMetaObject.connectSlotsByName(Clone)
52 | Clone.setTabOrder(self.lineDsn, self.comboDsn)
53 | Clone.setTabOrder(self.comboDsn, self.buttonBox)
54 |
55 | def retranslateUi(self, Clone):
56 | _translate = QtCore.QCoreApplication.translate
57 | Clone.setWindowTitle(_translate("Clone", "Clone field"))
58 | self.label.setText(_translate("Clone", "A name for the new field:"))
59 | self.label_3.setText(_translate("Clone", "Insert at position:"))
60 |
61 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/tableManagerUiClone.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | Clone
4 |
5 |
6 |
7 | 0
8 | 0
9 | 375
10 | 210
11 |
12 |
13 |
14 | Clone field
15 |
16 |
17 | -
18 |
19 |
-
20 |
21 |
22 | Qt::Vertical
23 |
24 |
25 | QSizePolicy::MinimumExpanding
26 |
27 |
28 |
29 | 20
30 | 20
31 |
32 |
33 |
34 |
35 | -
36 |
37 |
38 |
39 | 0
40 | 0
41 |
42 |
43 |
44 | A name for the new field:
45 |
46 |
47 |
48 | -
49 |
50 |
51 | false
52 |
53 |
54 |
55 |
56 |
57 | 10
58 |
59 |
60 | true
61 |
62 |
63 |
64 | -
65 |
66 |
67 | Insert at position:
68 |
69 |
70 |
71 | -
72 |
73 |
74 |
75 |
76 | -
77 |
78 |
79 | Qt::Horizontal
80 |
81 |
82 | QDialogButtonBox::Cancel|QDialogButtonBox::Ok
83 |
84 |
85 | true
86 |
87 |
88 |
89 | -
90 |
91 |
92 | Qt::Vertical
93 |
94 |
95 | QSizePolicy::MinimumExpanding
96 |
97 |
98 |
99 | 20
100 | 20
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 | lineDsn
109 | comboDsn
110 | buttonBox
111 |
112 |
113 |
114 |
115 | buttonBox
116 | accepted()
117 | Clone
118 | accept()
119 |
120 |
121 | 248
122 | 254
123 |
124 |
125 | 157
126 | 274
127 |
128 |
129 |
130 |
131 | buttonBox
132 | rejected()
133 | Clone
134 | reject()
135 |
136 |
137 | 316
138 | 260
139 |
140 |
141 | 286
142 | 274
143 |
144 |
145 |
146 |
147 |
148 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/tableManagerUiInsert.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 |
4 | from PyQt5 import QtCore, QtGui, QtWidgets
5 |
6 | class Ui_Insert(object):
7 | def setupUi(self, Insert):
8 | Insert.setObjectName("Insert")
9 | Insert.resize(420, 260)
10 | self.gridlayout = QtWidgets.QGridLayout(Insert)
11 | self.gridlayout.setObjectName("gridlayout")
12 | self.vboxlayout = QtWidgets.QVBoxLayout()
13 | self.vboxlayout.setObjectName("vboxlayout")
14 | self.label = QtWidgets.QLabel(Insert)
15 | sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
16 | sizePolicy.setHorizontalStretch(0)
17 | sizePolicy.setVerticalStretch(0)
18 | sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
19 | self.label.setSizePolicy(sizePolicy)
20 | self.label.setObjectName("label")
21 | self.vboxlayout.addWidget(self.label)
22 | self.lineName = QtWidgets.QLineEdit(Insert)
23 | self.lineName.setMouseTracking(False)
24 | self.lineName.setInputMask("")
25 | self.lineName.setMaxLength(10)
26 | self.lineName.setFrame(True)
27 | self.lineName.setObjectName("lineName")
28 | self.vboxlayout.addWidget(self.lineName)
29 | spacerItem = QtWidgets.QSpacerItem(20, 10, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
30 | self.vboxlayout.addItem(spacerItem)
31 | self.label_2 = QtWidgets.QLabel(Insert)
32 | sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
33 | sizePolicy.setHorizontalStretch(0)
34 | sizePolicy.setVerticalStretch(0)
35 | sizePolicy.setHeightForWidth(self.label_2.sizePolicy().hasHeightForWidth())
36 | self.label_2.setSizePolicy(sizePolicy)
37 | self.label_2.setObjectName("label_2")
38 | self.vboxlayout.addWidget(self.label_2)
39 | self.comboType = QtWidgets.QComboBox(Insert)
40 | self.comboType.setMaxVisibleItems(3)
41 | self.comboType.setObjectName("comboType")
42 | self.vboxlayout.addWidget(self.comboType)
43 | spacerItem1 = QtWidgets.QSpacerItem(20, 10, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
44 | self.vboxlayout.addItem(spacerItem1)
45 | self.label_3 = QtWidgets.QLabel(Insert)
46 | sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
47 | sizePolicy.setHorizontalStretch(0)
48 | sizePolicy.setVerticalStretch(0)
49 | sizePolicy.setHeightForWidth(self.label_3.sizePolicy().hasHeightForWidth())
50 | self.label_3.setSizePolicy(sizePolicy)
51 | self.label_3.setObjectName("label_3")
52 | self.vboxlayout.addWidget(self.label_3)
53 | self.comboPos = QtWidgets.QComboBox(Insert)
54 | self.comboPos.setObjectName("comboPos")
55 | self.vboxlayout.addWidget(self.comboPos)
56 | self.gridlayout.addLayout(self.vboxlayout, 0, 0, 1, 1)
57 | self.buttonBox = QtWidgets.QDialogButtonBox(Insert)
58 | self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
59 | self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
60 | self.buttonBox.setCenterButtons(True)
61 | self.buttonBox.setObjectName("buttonBox")
62 | self.gridlayout.addWidget(self.buttonBox, 3, 0, 1, 1)
63 | spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
64 | self.gridlayout.addItem(spacerItem2, 1, 0, 1, 1)
65 |
66 | self.retranslateUi(Insert)
67 | self.comboType.setCurrentIndex(-1)
68 | self.buttonBox.accepted.connect(Insert.accept)
69 | self.buttonBox.rejected.connect(Insert.reject)
70 | QtCore.QMetaObject.connectSlotsByName(Insert)
71 | Insert.setTabOrder(self.lineName, self.comboType)
72 | Insert.setTabOrder(self.comboType, self.comboPos)
73 | Insert.setTabOrder(self.comboPos, self.buttonBox)
74 |
75 | def retranslateUi(self, Insert):
76 | _translate = QtCore.QCoreApplication.translate
77 | Insert.setWindowTitle(_translate("Insert", "Insert field"))
78 | self.label.setText(_translate("Insert", "Field name:"))
79 | self.label_2.setText(_translate("Insert", "Field type:"))
80 | self.label_3.setText(_translate("Insert", "Insert at position:"))
81 |
82 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/tableManagerUiInsert.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | Insert
4 |
5 |
6 |
7 | 0
8 | 0
9 | 420
10 | 260
11 |
12 |
13 |
14 | Insert field
15 |
16 |
17 | -
18 |
19 |
-
20 |
21 |
22 |
23 | 0
24 | 0
25 |
26 |
27 |
28 | Field name:
29 |
30 |
31 |
32 | -
33 |
34 |
35 | false
36 |
37 |
38 |
39 |
40 |
41 | 10
42 |
43 |
44 | true
45 |
46 |
47 |
48 | -
49 |
50 |
51 | Qt::Vertical
52 |
53 |
54 | QSizePolicy::Fixed
55 |
56 |
57 |
58 | 20
59 | 10
60 |
61 |
62 |
63 |
64 | -
65 |
66 |
67 |
68 | 0
69 | 0
70 |
71 |
72 |
73 | Field type:
74 |
75 |
76 |
77 | -
78 |
79 |
80 | -1
81 |
82 |
83 | 3
84 |
85 |
86 |
87 | -
88 |
89 |
90 | Qt::Vertical
91 |
92 |
93 | QSizePolicy::Fixed
94 |
95 |
96 |
97 | 20
98 | 10
99 |
100 |
101 |
102 |
103 | -
104 |
105 |
106 |
107 | 0
108 | 0
109 |
110 |
111 |
112 | Insert at position:
113 |
114 |
115 |
116 | -
117 |
118 |
119 |
120 |
121 | -
122 |
123 |
124 | Qt::Horizontal
125 |
126 |
127 | QDialogButtonBox::Cancel|QDialogButtonBox::Ok
128 |
129 |
130 | true
131 |
132 |
133 |
134 | -
135 |
136 |
137 | Qt::Vertical
138 |
139 |
140 |
141 | 20
142 | 40
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 | lineName
151 | comboType
152 | comboPos
153 | buttonBox
154 |
155 |
156 |
157 |
158 | buttonBox
159 | accepted()
160 | Insert
161 | accept()
162 |
163 |
164 | 248
165 | 254
166 |
167 |
168 | 157
169 | 274
170 |
171 |
172 |
173 |
174 | buttonBox
175 | rejected()
176 | Insert
177 | reject()
178 |
179 |
180 | 316
181 | 260
182 |
183 |
184 | 286
185 | 274
186 |
187 |
188 |
189 |
190 |
191 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/tableManagerUiRename.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 |
4 |
5 | from PyQt5 import QtCore, QtGui, QtWidgets
6 |
7 | class Ui_Rename(object):
8 | def setupUi(self, Rename):
9 | Rename.setObjectName("Rename")
10 | Rename.resize(397, 126)
11 | self.gridlayout = QtWidgets.QGridLayout(Rename)
12 | self.gridlayout.setObjectName("gridlayout")
13 | self.vboxlayout = QtWidgets.QVBoxLayout()
14 | self.vboxlayout.setObjectName("vboxlayout")
15 | self.label = QtWidgets.QLabel(Rename)
16 | sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
17 | sizePolicy.setHorizontalStretch(0)
18 | sizePolicy.setVerticalStretch(0)
19 | sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
20 | self.label.setSizePolicy(sizePolicy)
21 | self.label.setObjectName("label")
22 | self.vboxlayout.addWidget(self.label)
23 | self.lineEdit = QtWidgets.QLineEdit(Rename)
24 | self.lineEdit.setMouseTracking(False)
25 | self.lineEdit.setInputMask("")
26 | self.lineEdit.setMaxLength(10)
27 | self.lineEdit.setFrame(True)
28 | self.lineEdit.setObjectName("lineEdit")
29 | self.vboxlayout.addWidget(self.lineEdit)
30 | self.gridlayout.addLayout(self.vboxlayout, 0, 0, 1, 1)
31 | self.buttonBox = QtWidgets.QDialogButtonBox(Rename)
32 | self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
33 | self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
34 | self.buttonBox.setCenterButtons(True)
35 | self.buttonBox.setObjectName("buttonBox")
36 | self.gridlayout.addWidget(self.buttonBox, 2, 0, 1, 1)
37 | spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
38 | self.gridlayout.addItem(spacerItem, 1, 0, 1, 1)
39 |
40 | self.retranslateUi(Rename)
41 | self.buttonBox.accepted.connect(Rename.accept)
42 | self.buttonBox.rejected.connect(Rename.reject)
43 | QtCore.QMetaObject.connectSlotsByName(Rename)
44 |
45 | def retranslateUi(self, Rename):
46 | _translate = QtCore.QCoreApplication.translate
47 | Rename.setWindowTitle(_translate("Rename", "Rename field"))
48 | self.label.setText(_translate("Rename", "Enter new field name:"))
49 |
50 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/tableManagerUiRename.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | Rename
4 |
5 |
6 |
7 | 0
8 | 0
9 | 397
10 | 126
11 |
12 |
13 |
14 | Rename field
15 |
16 |
17 | -
18 |
19 |
-
20 |
21 |
22 |
23 | 0
24 | 0
25 |
26 |
27 |
28 | Enter new field name:
29 |
30 |
31 |
32 | -
33 |
34 |
35 | false
36 |
37 |
38 |
39 |
40 |
41 | 10
42 |
43 |
44 | true
45 |
46 |
47 |
48 |
49 |
50 | -
51 |
52 |
53 | Qt::Horizontal
54 |
55 |
56 | QDialogButtonBox::Cancel|QDialogButtonBox::Ok
57 |
58 |
59 | true
60 |
61 |
62 |
63 | -
64 |
65 |
66 | Qt::Vertical
67 |
68 |
69 | QSizePolicy::Expanding
70 |
71 |
72 |
73 | 20
74 | 40
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 | buttonBox
85 | accepted()
86 | Rename
87 | accept()
88 |
89 |
90 | 248
91 | 254
92 |
93 |
94 | 157
95 | 274
96 |
97 |
98 |
99 |
100 | buttonBox
101 | rejected()
102 | Rename
103 | reject()
104 |
105 |
106 | 316
107 | 260
108 |
109 |
110 | 286
111 | 274
112 |
113 |
114 |
115 |
116 |
117 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/terrain.frag.glsl:
--------------------------------------------------------------------------------
1 | #version 150
2 |
3 | // This is the terrain fragment shader. There is a lot of code in here
4 | // which is not necessary to render the terrain, but included for convenience -
5 | // Like generating normals from the heightmap or a simple fog effect.
6 |
7 | // Most of the time you want to adjust this shader to get your terrain the look
8 | // you want. The vertex shader most likely will stay the same.
9 |
10 | in vec2 terrain_uv;
11 | in vec3 vtx_pos;
12 | out vec4 color;
13 |
14 | uniform struct {
15 | sampler2D data_texture;
16 | sampler2D heightfield;
17 | int view_index;
18 | int terrain_size;
19 | int chunk_size;
20 | } ShaderTerrainMesh;
21 |
22 | uniform sampler2D p3d_Texture0;
23 | uniform vec3 wspos_camera;
24 |
25 | // Compute normal from the heightmap, this assumes the terrain is facing z-up
26 | vec3 get_terrain_normal() {
27 | const float terrain_height = 15.0;
28 | vec3 pixel_size = vec3(1.0, -1.0, 0) / textureSize(ShaderTerrainMesh.heightfield, 0).xxx;
29 | float u0 = texture(ShaderTerrainMesh.heightfield, terrain_uv + pixel_size.yz).x * terrain_height;
30 | float u1 = texture(ShaderTerrainMesh.heightfield, terrain_uv + pixel_size.xz).x * terrain_height;
31 | float v0 = texture(ShaderTerrainMesh.heightfield, terrain_uv + pixel_size.zy).x * terrain_height;
32 | float v1 = texture(ShaderTerrainMesh.heightfield, terrain_uv + pixel_size.zx).x * terrain_height;
33 | vec3 tangent = normalize(vec3(1.0, 0, u1 - u0));
34 | vec3 binormal = normalize(vec3(0, 1.0, v1 - v0));
35 | return normalize(cross(tangent, binormal));
36 | }
37 |
38 |
39 |
40 | void main() {
41 | vec3 diffuse = texture(p3d_Texture0, terrain_uv).xyz;
42 | vec3 normal = get_terrain_normal();
43 |
44 | // Add some fake lighting - you usually want to use your own lighting code here
45 | vec3 fake_sun = normalize(vec3(0.7, 0.2, 0.6));
46 | vec3 shading = max(0.0, dot(normal, fake_sun)) * diffuse;
47 | shading += vec3(0.07, 0.07, 0.1);
48 |
49 |
50 |
51 | color = vec4(shading, 1.0);
52 | }
53 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/terrain.vert.glsl:
--------------------------------------------------------------------------------
1 | #version 150
2 |
3 | // This is the default terrain vertex shader. Most of the time you can just copy
4 | // this and reuse it, and just modify the fragment shader.
5 |
6 | in vec4 p3d_Vertex;
7 | uniform mat4 p3d_ModelViewProjectionMatrix;
8 | uniform mat4 p3d_ModelMatrix;
9 |
10 | uniform struct {
11 | sampler2D data_texture;
12 | sampler2D heightfield;
13 | int view_index;
14 | int terrain_size;
15 | int chunk_size;
16 | } ShaderTerrainMesh;
17 |
18 | out vec2 terrain_uv;
19 | out vec3 vtx_pos;
20 |
21 | void main() {
22 |
23 | // Terrain data has the layout:
24 | // x: x-pos, y: y-pos, z: size, w: clod
25 | vec4 terrain_data = texelFetch(ShaderTerrainMesh.data_texture,
26 | ivec2(gl_InstanceID, ShaderTerrainMesh.view_index), 0);
27 |
28 | // Get initial chunk position in the (0, 0, 0), (1, 1, 0) range
29 | vec3 chunk_position = p3d_Vertex.xyz;
30 |
31 | // CLOD implementation
32 | float clod_factor = smoothstep(0, 1, terrain_data.w);
33 | chunk_position.xy -= clod_factor * fract(chunk_position.xy * ShaderTerrainMesh.chunk_size / 2.0)
34 | * 2.0 / ShaderTerrainMesh.chunk_size;
35 |
36 | // Scale the chunk
37 | chunk_position *= terrain_data.z * float(ShaderTerrainMesh.chunk_size)
38 | / float(ShaderTerrainMesh.terrain_size);
39 | chunk_position.z *= ShaderTerrainMesh.chunk_size;
40 |
41 | // Offset the chunk, it is important that this happens after the scale
42 | chunk_position.xy += terrain_data.xy / float(ShaderTerrainMesh.terrain_size);
43 |
44 | // Compute the terrain UV coordinates
45 | terrain_uv = chunk_position.xy;
46 |
47 | // Sample the heightfield and offset the terrain - we do not need to multiply
48 | // the height with anything since the terrain transform is included in the
49 | // model view projection matrix.
50 | chunk_position.z += texture(ShaderTerrainMesh.heightfield, terrain_uv).x;
51 | gl_Position = p3d_ModelViewProjectionMatrix * vec4(chunk_position, 1);
52 |
53 | // Output the vertex world space position - in this case we use this to render
54 | // the fog.
55 | // vtx_pos = (p3d_ModelMatrix * vec4(chunk_position, 1)).xyz;
56 | }
57 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/test/__init__.py:
--------------------------------------------------------------------------------
1 | # import qgis libs so that ve set the correct sip api version
2 | import qgis # pylint: disable=W0611 # NOQA
--------------------------------------------------------------------------------
/Video_UAV_Tracker/test/__pycache__/qgis_interface.cpython-39.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/test/__pycache__/qgis_interface.cpython-39.pyc
--------------------------------------------------------------------------------
/Video_UAV_Tracker/test/__pycache__/test_VideoGis_dockwidget.cpython-39.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/test/__pycache__/test_VideoGis_dockwidget.cpython-39.pyc
--------------------------------------------------------------------------------
/Video_UAV_Tracker/test/__pycache__/test_init.cpython-39.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagost/Video_UAV_Tracker-3D/a0f655d386cd288dee574221e42a4de7b1735cfb/Video_UAV_Tracker/test/__pycache__/test_init.cpython-39.pyc
--------------------------------------------------------------------------------
/Video_UAV_Tracker/test/qgis_interface.py:
--------------------------------------------------------------------------------
1 | # coding=utf-8
2 | """QGIS plugin implementation.
3 |
4 | .. note:: This program is free software; you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation; either version 2 of the License, or
7 | (at your option) any later version.
8 |
9 | .. note:: This source code was copied from the 'postgis viewer' application
10 | with original authors:
11 | Copyright (c) 2010 by Ivan Mincik, ivan.mincik@gista.sk
12 | Copyright (c) 2011 German Carrillo, geotux_tuxman@linuxmail.org
13 | Copyright (c) 2014 Tim Sutton, tim@linfiniti.com
14 |
15 | """
16 |
17 | __author__ = 'tim@linfiniti.com'
18 | __revision__ = '$Format:%H$'
19 | __date__ = '10/01/2011'
20 | __copyright__ = (
21 | 'Copyright (c) 2010 by Ivan Mincik, ivan.mincik@gista.sk and '
22 | 'Copyright (c) 2011 German Carrillo, geotux_tuxman@linuxmail.org'
23 | 'Copyright (c) 2014 Tim Sutton, tim@linfiniti.com'
24 | )
25 |
26 | import logging
27 | from PyQt5.QtCore import QObject, pyqtSlot, pyqtSignal
28 | from qgis.core import QgsMapLayerRegistry
29 | from qgis.gui import QgsMapCanvasLayer
30 | LOGGER = logging.getLogger('QGIS')
31 |
32 |
33 | #noinspection PyMethodMayBeStatic,PyPep8Naming
34 | class QgisInterface(QObject):
35 | """Class to expose QGIS objects and functions to plugins.
36 |
37 | This class is here for enabling us to run unit tests only,
38 | so most methods are simply stubs.
39 | """
40 | currentLayerChanged = pyqtSignal(QgsMapCanvasLayer)
41 |
42 | def __init__(self, canvas):
43 | """Constructor
44 | :param canvas:
45 | """
46 | QObject.__init__(self)
47 | self.canvas = canvas
48 | # Set up slots so we can mimic the behaviour of QGIS when layers
49 | # are added.
50 | LOGGER.debug('Initialising canvas...')
51 | # noinspection PyArgumentList
52 | QgsMapLayerRegistry.instance().layersAdded.connect(self.addLayers)
53 | # noinspection PyArgumentList
54 | QgsMapLayerRegistry.instance().layerWasAdded.connect(self.addLayer)
55 | # noinspection PyArgumentList
56 | QgsMapLayerRegistry.instance().removeAll.connect(self.removeAllLayers)
57 |
58 | # For processing module
59 | self.destCrs = None
60 |
61 | @pyqtSlot('QStringList')
62 | def addLayers(self, layers):
63 | """Handle layers being added to the registry so they show up in canvas.
64 |
65 | :param layers: list list of map layers that were added
66 |
67 | .. note:: The QgsInterface api does not include this method,
68 | it is added here as a helper to facilitate testing.
69 | """
70 | #LOGGER.debug('addLayers called on qgis_interface')
71 | #LOGGER.debug('Number of layers being added: %s' % len(layers))
72 | #LOGGER.debug('Layer Count Before: %s' % len(self.canvas.layers()))
73 | current_layers = self.canvas.layers()
74 | final_layers = []
75 | for layer in current_layers:
76 | final_layers.append(QgsMapCanvasLayer(layer))
77 | for layer in layers:
78 | final_layers.append(QgsMapCanvasLayer(layer))
79 |
80 | self.canvas.setLayerSet(final_layers)
81 | #LOGGER.debug('Layer Count After: %s' % len(self.canvas.layers()))
82 |
83 | @pyqtSlot('QgsMapLayer')
84 | def addLayer(self, layer):
85 | """Handle a layer being added to the registry so it shows up in canvas.
86 |
87 | :param layer: list list of map layers that were added
88 |
89 | .. note: The QgsInterface api does not include this method, it is added
90 | here as a helper to facilitate testing.
91 |
92 | .. note: The addLayer method was deprecated in QGIS 1.8 so you should
93 | not need this method much.
94 | """
95 | pass
96 |
97 | @pyqtSlot()
98 | def removeAllLayers(self):
99 | """Remove layers from the canvas before they get deleted."""
100 | self.canvas.setLayerSet([])
101 |
102 | def newProject(self):
103 | """Create new project."""
104 | # noinspection PyArgumentList
105 | QgsMapLayerRegistry.instance().removeAllMapLayers()
106 |
107 | # ---------------- API Mock for QgsInterface follows -------------------
108 |
109 | def zoomFull(self):
110 | """Zoom to the map full extent."""
111 | pass
112 |
113 | def zoomToPrevious(self):
114 | """Zoom to previous view extent."""
115 | pass
116 |
117 | def zoomToNext(self):
118 | """Zoom to next view extent."""
119 | pass
120 |
121 | def zoomToActiveLayer(self):
122 | """Zoom to extent of active layer."""
123 | pass
124 |
125 | def addVectorLayer(self, path, base_name, provider_key):
126 | """Add a vector layer.
127 |
128 | :param path: Path to layer.
129 | :type path: str
130 |
131 | :param base_name: Base name for layer.
132 | :type base_name: str
133 |
134 | :param provider_key: Provider key e.g. 'ogr'
135 | :type provider_key: str
136 | """
137 | pass
138 |
139 | def addRasterLayer(self, path, base_name):
140 | """Add a raster layer given a raster layer file name
141 |
142 | :param path: Path to layer.
143 | :type path: str
144 |
145 | :param base_name: Base name for layer.
146 | :type base_name: str
147 | """
148 | pass
149 |
150 | def activeLayer(self):
151 | """Get pointer to the active layer (layer selected in the legend)."""
152 | # noinspection PyArgumentList
153 | layers = QgsMapLayerRegistry.instance().mapLayers()
154 | for item in layers:
155 | return layers[item]
156 |
157 | def addToolBarIcon(self, action):
158 | """Add an icon to the plugins toolbar.
159 |
160 | :param action: Action to add to the toolbar.
161 | :type action: QAction
162 | """
163 | pass
164 |
165 | def removeToolBarIcon(self, action):
166 | """Remove an action (icon) from the plugin toolbar.
167 |
168 | :param action: Action to add to the toolbar.
169 | :type action: QAction
170 | """
171 | pass
172 |
173 | def addToolBar(self, name):
174 | """Add toolbar with specified name.
175 |
176 | :param name: Name for the toolbar.
177 | :type name: str
178 | """
179 | pass
180 |
181 | def mapCanvas(self):
182 | """Return a pointer to the map canvas."""
183 | return self.canvas
184 |
185 | def mainWindow(self):
186 | """Return a pointer to the main window.
187 |
188 | In case of QGIS it returns an instance of QgisApp.
189 | """
190 | pass
191 |
192 | def addDockWidget(self, area, dock_widget):
193 | """Add a dock widget to the main window.
194 |
195 | :param area: Where in the ui the dock should be placed.
196 | :type area:
197 |
198 | :param dock_widget: A dock widget to add to the UI.
199 | :type dock_widget: QDockWidget
200 | """
201 | pass
202 |
203 | def legendInterface(self):
204 | """Get the legend."""
205 | return self.canvas
206 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/test/tenbytenraster.asc:
--------------------------------------------------------------------------------
1 | NCOLS 10
2 | NROWS 10
3 | XLLCENTER 1535380.000000
4 | YLLCENTER 5083260.000000
5 | DX 10
6 | DY 10
7 | NODATA_VALUE -9999
8 | 0 1 2 3 4 5 6 7 8 9
9 | 0 1 2 3 4 5 6 7 8 9
10 | 0 1 2 3 4 5 6 7 8 9
11 | 0 1 2 3 4 5 6 7 8 9
12 | 0 1 2 3 4 5 6 7 8 9
13 | 0 1 2 3 4 5 6 7 8 9
14 | 0 1 2 3 4 5 6 7 8 9
15 | 0 1 2 3 4 5 6 7 8 9
16 | 0 1 2 3 4 5 6 7 8 9
17 | 0 1 2 3 4 5 6 7 8 9
18 | CRS
19 | NOTES
20 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/test/tenbytenraster.asc.aux.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Point
4 |
5 |
6 |
7 | 9
8 | 4.5
9 | 0
10 | 2.872281323269
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/test/tenbytenraster.keywords:
--------------------------------------------------------------------------------
1 | title: Tenbytenraster
2 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/test/tenbytenraster.lic:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Tim Sutton, Linfiniti Consulting CC
5 |
6 |
7 |
8 | tenbytenraster.asc
9 | 2700044251
10 | Yes
11 | Tim Sutton
12 | Tim Sutton (QGIS Source Tree)
13 | Tim Sutton
14 | This data is publicly available from QGIS Source Tree. The original
15 | file was created and contributed to QGIS by Tim Sutton.
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/test/tenbytenraster.prj:
--------------------------------------------------------------------------------
1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
--------------------------------------------------------------------------------
/Video_UAV_Tracker/test/tenbytenraster.qml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | 0
26 |
27 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/test/test_VideoGis_dockwidget.py:
--------------------------------------------------------------------------------
1 | # coding=utf-8
2 | """DockWidget test.
3 |
4 | .. note:: This program is free software; you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation; either version 2 of the License, or
7 | (at your option) any later version.
8 |
9 | """
10 |
11 | __author__ = 'sagost@katamail.com'
12 | __date__ = '2017-02-13'
13 | __copyright__ = 'Copyright 2017, Salvatore Agosta'
14 |
15 | import unittest
16 |
17 | from PyQt5.QtGui import QDockWidget
18 |
19 | from VideoGis_dockwidget import VideoGisDockWidget
20 |
21 | from utilities import get_qgis_app
22 |
23 | QGIS_APP = get_qgis_app()
24 |
25 |
26 | class VideoGisDockWidgetTest(unittest.TestCase):
27 | """Test dockwidget works."""
28 |
29 | def setUp(self):
30 | """Runs before each test."""
31 | self.dockwidget = VideoGisDockWidget(None)
32 |
33 | def tearDown(self):
34 | """Runs after each test."""
35 | self.dockwidget = None
36 |
37 | def test_dockwidget_ok(self):
38 | """Test we can click OK."""
39 | pass
40 |
41 | if __name__ == "__main__":
42 | suite = unittest.makeSuite(VideoGisDialogTest)
43 | runner = unittest.TextTestRunner(verbosity=2)
44 | runner.run(suite)
45 |
46 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/test/test_init.py:
--------------------------------------------------------------------------------
1 | # coding=utf-8
2 | """Tests QGIS plugin init."""
3 |
4 | __author__ = 'Tim Sutton '
5 | __revision__ = '$Format:%H$'
6 | __date__ = '17/10/2010'
7 | __license__ = "GPL"
8 | __copyright__ = 'Copyright 2012, Australia Indonesia Facility for '
9 | __copyright__ += 'Disaster Reduction'
10 |
11 | import os
12 | import unittest
13 | import logging
14 | import configparser
15 |
16 | LOGGER = logging.getLogger('QGIS')
17 |
18 |
19 | class TestInit(unittest.TestCase):
20 | """Test that the plugin init is usable for QGIS.
21 |
22 | Based heavily on the validator class by Alessandro
23 | Passoti available here:
24 |
25 | http://github.com/qgis/qgis-django/blob/master/qgis-app/
26 | plugins/validator.py
27 |
28 | """
29 |
30 | def test_read_init(self):
31 | """Test that the plugin __init__ will validate on plugins.qgis.org."""
32 |
33 | # You should update this list according to the latest in
34 | # https://github.com/qgis/qgis-django/blob/master/qgis-app/
35 | # plugins/validator.py
36 |
37 | required_metadata = [
38 | 'name',
39 | 'description',
40 | 'version',
41 | 'qgisMinimumVersion',
42 | 'email',
43 | 'author']
44 |
45 | file_path = os.path.abspath(os.path.join(
46 | os.path.dirname(__file__), os.pardir,
47 | 'metadata.txt'))
48 | LOGGER.info(file_path)
49 | metadata = []
50 | parser = configparser.ConfigParser()
51 | parser.optionxform = str
52 | parser.read(file_path)
53 | message = 'Cannot find a section named "general" in %s' % file_path
54 | assert parser.has_section('general'), message
55 | metadata.extend(parser.items('general'))
56 |
57 | for expectation in required_metadata:
58 | message = ('Cannot find metadata "%s" in metadata source (%s).' % (
59 | expectation, file_path))
60 |
61 | self.assertIn(expectation, dict(metadata), message)
62 |
63 | if __name__ == '__main__':
64 | unittest.main()
65 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/test/test_qgis_environment.py:
--------------------------------------------------------------------------------
1 | # coding=utf-8
2 | """Tests for QGIS functionality.
3 |
4 |
5 | .. note:: This program is free software; you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation; either version 2 of the License, or
8 | (at your option) any later version.
9 |
10 | """
11 | __author__ = 'tim@linfiniti.com'
12 | __date__ = '20/01/2011'
13 | __copyright__ = ('Copyright 2012, Australia Indonesia Facility for '
14 | 'Disaster Reduction')
15 |
16 | import os
17 | import unittest
18 | from qgis.core import (
19 | QgsProviderRegistry,
20 | QgsCoordinateReferenceSystem,
21 | QgsRasterLayer)
22 |
23 | from .utilities import get_qgis_app
24 | QGIS_APP = get_qgis_app()
25 |
26 |
27 | class QGISTest(unittest.TestCase):
28 | """Test the QGIS Environment"""
29 |
30 | def test_qgis_environment(self):
31 | """QGIS environment has the expected providers"""
32 |
33 | r = QgsProviderRegistry.instance()
34 | self.assertIn('gdal', r.providerList())
35 | self.assertIn('ogr', r.providerList())
36 | self.assertIn('postgres', r.providerList())
37 |
38 | def test_projection(self):
39 | """Test that QGIS properly parses a wkt string.
40 | """
41 | crs = QgsCoordinateReferenceSystem()
42 | wkt = (
43 | 'GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",'
44 | 'SPHEROID["WGS_1984",6378137.0,298.257223563]],'
45 | 'PRIMEM["Greenwich",0.0],UNIT["Degree",'
46 | '0.0174532925199433]]')
47 | crs.createFromWkt(wkt)
48 | auth_id = crs.authid()
49 | expected_auth_id = 'EPSG:4326'
50 | self.assertEqual(auth_id, expected_auth_id)
51 |
52 | # now test for a loaded layer
53 | path = os.path.join(os.path.dirname(__file__), 'tenbytenraster.asc')
54 | title = 'TestRaster'
55 | layer = QgsRasterLayer(path, title)
56 | auth_id = layer.crs().authid()
57 | self.assertEqual(auth_id, expected_auth_id)
58 |
59 | if __name__ == '__main__':
60 | unittest.main()
61 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/test/test_resources.py:
--------------------------------------------------------------------------------
1 | # coding=utf-8
2 | """Resources test.
3 |
4 | .. note:: This program is free software; you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation; either version 2 of the License, or
7 | (at your option) any later version.
8 |
9 | """
10 |
11 | __author__ = 'sagost@katamail.com'
12 | __date__ = '2017-02-13'
13 | __copyright__ = 'Copyright 2017, Salvatore Agosta'
14 |
15 | import unittest
16 |
17 | from PyQt5.QtGui import QIcon
18 |
19 |
20 |
21 | class VideoGisDialogTest(unittest.TestCase):
22 | """Test rerources work."""
23 |
24 | def setUp(self):
25 | """Runs before each test."""
26 | pass
27 |
28 | def tearDown(self):
29 | """Runs after each test."""
30 | pass
31 |
32 | def test_icon_png(self):
33 | """Test we can click OK."""
34 | path = ':/plugins/VideoGis/icon.png'
35 | icon = QIcon(path)
36 | self.assertFalse(icon.isNull())
37 |
38 | if __name__ == "__main__":
39 | suite = unittest.makeSuite(VideoGisResourcesTest)
40 | runner = unittest.TextTestRunner(verbosity=2)
41 | runner.run(suite)
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/test/test_translations.py:
--------------------------------------------------------------------------------
1 | # coding=utf-8
2 | """Safe Translations Test.
3 |
4 | .. note:: This program is free software; you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation; either version 2 of the License, or
7 | (at your option) any later version.
8 |
9 | """
10 | from .utilities import get_qgis_app
11 |
12 | __author__ = 'ismailsunni@yahoo.co.id'
13 | __date__ = '12/10/2011'
14 | __copyright__ = ('Copyright 2012, Australia Indonesia Facility for '
15 | 'Disaster Reduction')
16 | import unittest
17 | import os
18 |
19 | from PyQt5.QtCore import QCoreApplication, QTranslator
20 |
21 | QGIS_APP = get_qgis_app()
22 |
23 |
24 | class SafeTranslationsTest(unittest.TestCase):
25 | """Test translations work."""
26 |
27 | def setUp(self):
28 | """Runs before each test."""
29 | if 'LANG' in iter(os.environ.keys()):
30 | os.environ.__delitem__('LANG')
31 |
32 | def tearDown(self):
33 | """Runs after each test."""
34 | if 'LANG' in iter(os.environ.keys()):
35 | os.environ.__delitem__('LANG')
36 |
37 | def test_qgis_translations(self):
38 | """Test that translations work."""
39 | parent_path = os.path.join(__file__, os.path.pardir, os.path.pardir)
40 | dir_path = os.path.abspath(parent_path)
41 | file_path = os.path.join(
42 | dir_path, 'i18n', 'af.qm')
43 | translator = QTranslator()
44 | translator.load(file_path)
45 | QCoreApplication.installTranslator(translator)
46 |
47 | expected_message = 'Goeie more'
48 | real_message = QCoreApplication.translate("@default", 'Good morning')
49 | self.assertEqual(real_message, expected_message)
50 |
51 |
52 | if __name__ == "__main__":
53 | suite = unittest.makeSuite(SafeTranslationsTest)
54 | runner = unittest.TextTestRunner(verbosity=2)
55 | runner.run(suite)
56 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/test/utilities.py:
--------------------------------------------------------------------------------
1 | # coding=utf-8
2 | """Common functionality used by regression tests."""
3 |
4 | import sys
5 | import logging
6 |
7 |
8 | LOGGER = logging.getLogger('QGIS')
9 | QGIS_APP = None # Static variable used to hold hand to running QGIS app
10 | CANVAS = None
11 | PARENT = None
12 | IFACE = None
13 |
14 |
15 | def get_qgis_app():
16 | """ Start one QGIS application to test against.
17 |
18 | :returns: Handle to QGIS app, canvas, iface and parent. If there are any
19 | errors the tuple members will be returned as None.
20 | :rtype: (QgsApplication, CANVAS, IFACE, PARENT)
21 |
22 | If QGIS is already running the handle to that app will be returned.
23 | """
24 |
25 | try:
26 | from PyQt5 import QtGui, QtCore
27 | from qgis.core import QgsApplication
28 | from qgis.gui import QgsMapCanvas
29 | from .qgis_interface import QgisInterface
30 | except ImportError:
31 | return None, None, None, None
32 |
33 | global QGIS_APP # pylint: disable=W0603
34 |
35 | if QGIS_APP is None:
36 | gui_flag = True # All test will run qgis in gui mode
37 | #noinspection PyPep8Naming
38 | QGIS_APP = QgsApplication(sys.argv, gui_flag)
39 | # Make sure QGIS_PREFIX_PATH is set in your env if needed!
40 | QGIS_APP.initQgis()
41 | s = QGIS_APP.showSettings()
42 | LOGGER.debug(s)
43 |
44 | global PARENT # pylint: disable=W0603
45 | if PARENT is None:
46 | #noinspection PyPep8Naming
47 | PARENT = QtGui.QWidget()
48 |
49 | global CANVAS # pylint: disable=W0603
50 | if CANVAS is None:
51 | #noinspection PyPep8Naming
52 | CANVAS = QgsMapCanvas(PARENT)
53 | CANVAS.resize(QtCore.QSize(400, 400))
54 |
55 | global IFACE # pylint: disable=W0603
56 | if IFACE is None:
57 | # QgisInterface is a stub implementation of the QGIS plugin interface
58 | #noinspection PyPep8Naming
59 | IFACE = QgisInterface(CANVAS)
60 |
61 | return QGIS_APP, CANVAS, IFACE, PARENT
62 |
--------------------------------------------------------------------------------
/Video_UAV_Tracker/vut_newproject.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | '''
3 | Video Uav Tracker v 2.1 (3D)
4 |
5 | Replay a video in sync with a gps track displayed on the map.
6 |
7 |
8 | -------------------
9 | copyright : (C) 2017 by Salvatore Agosta
10 | email : sagost@katamail.com
11 |
12 |
13 | This program is free software; you can redistribute it and/or modify
14 | it under the terms of the GNU General Public License as published by
15 | the Free Software Foundation; either version 2 of the License, or
16 | (at your option) any later version.
17 |
18 |
19 | INSTRUCTION:
20 |
21 | ATTENTION: 3D IS NOT TESTED ON WINDOWS PLATFORM
22 | - Pixel value query need a .npz archive containing one array data for every frame, it must be named as 'VideoFile.npz' and be in the same folder of 'VideoFile.mp4'
23 | - for 3d options install numpy,panda3d and pypng python3 modules
24 | - Download all files from https://github.com/sagost/Video_UAV_Tracker-3D/Video_UAV_Tracker/FFMPEG and copy them in your Video_Uav_Tracker/FFMPEG folder
25 |
26 | Syncing:
27 | - Create new project
28 | - Select video and .gpx track (1 trkpt per second)
29 | - Create associated shapefile
30 | - Manage 3d options (select dem and image with same extension and cartographic projection)
31 | - Identify first couple Frame/GpsTime and select it.
32 | - Push Synchronize
33 | - Push Start
34 |
35 | Replay:
36 | - Move on map
37 | - Create associated DB shapefile
38 | - Add POI with associated video frame saved
39 | - Add POI directly from video sceen if 3D is active
40 | - Create direct georeferenced mosaic if 3D is active
41 | - Extract frames with associated coordinates for rapid photogrammetry use
42 | '''
43 |
44 |
45 | import sys
46 | import os
47 | from PyQt5 import QtCore, QtGui, QtWidgets
48 | from PyQt5.QtMultimediaWidgets import QVideoWidget
49 |
50 | import resources
51 |
52 | class Ui_NewProject(object):
53 | def setupUi(self, NewProject):
54 | NewProject.setObjectName("NewProject")
55 | NewProject.resize(736, 625)
56 | icon = QtGui.QIcon()
57 | icon.addPixmap(QtGui.QPixmap(":/plugins/VideoGis/icon.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
58 | NewProject.setWindowIcon(icon)
59 | self.gridLayout_2 = QtWidgets.QGridLayout(NewProject)
60 | self.gridLayout_2.setObjectName("gridLayout_2")
61 | self.gridLayout = QtWidgets.QGridLayout()
62 | self.gridLayout.setObjectName("gridLayout")
63 | self.horizontalLayout = QtWidgets.QHBoxLayout()
64 | self.horizontalLayout.setObjectName("horizontalLayout")
65 | self.video_frame_2 = QVideoWidget(NewProject)
66 | p = self.video_frame_2.palette()
67 | p.setColor(QtGui.QPalette.Window, QtCore.Qt.black)
68 | self.video_frame_2.setPalette(p)
69 | self.video_frame_2.setAttribute(QtCore.Qt.WA_OpaquePaintEvent)
70 | sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
71 | sizePolicy.setHorizontalStretch(0)
72 | sizePolicy.setVerticalStretch(0)
73 | sizePolicy.setHeightForWidth(self.video_frame_2.sizePolicy().hasHeightForWidth())
74 | self.video_frame_2.setSizePolicy(sizePolicy)
75 | self.video_frame_2.setStyleSheet("background-color: rgb(0, 0, 10);")
76 | self.video_frame_2.setObjectName("video_frame_2")
77 |
78 | # self.scroll = QtWidgets.QScrollArea()#+
79 | # self.scroll.setWidget(self.video_frame_2)#+
80 | # self.video_frame_2.setGeometry(0,0,736,625)
81 | # self.horizontalLayout.addWidget(self.scroll)
82 |
83 | self.horizontalLayout.addWidget(self.video_frame_2)
84 |
85 |
86 |
87 |
88 |
89 | self.gridLayout.addLayout(self.horizontalLayout, 0, 0, 1, 16)
90 | self.horizontalSlider = QtWidgets.QSlider(NewProject)
91 | self.horizontalSlider.setOrientation(QtCore.Qt.Horizontal)
92 | self.horizontalSlider.setObjectName("horizontalSlider")
93 | self.gridLayout.addWidget(self.horizontalSlider, 1, 0, 1, 16)
94 | self.replayPlay_pushButton = QtWidgets.QPushButton(NewProject)
95 | sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred)
96 | sizePolicy.setHorizontalStretch(0)
97 | sizePolicy.setVerticalStretch(0)
98 | sizePolicy.setHeightForWidth(self.replayPlay_pushButton.sizePolicy().hasHeightForWidth())
99 | self.replayPlay_pushButton.setSizePolicy(sizePolicy)
100 | self.replayPlay_pushButton.setCheckable(False)
101 | self.replayPlay_pushButton.setChecked(False)
102 | self.replayPlay_pushButton.setObjectName("replayPlay_pushButton")
103 | self.gridLayout.addWidget(self.replayPlay_pushButton, 3, 1, 1, 1)
104 | self.replayPosition_label = QtWidgets.QLabel(NewProject)
105 | self.replayPosition_label.setObjectName("replayPosition_label")
106 | self.gridLayout.addWidget(self.replayPosition_label, 3, 4, 1, 1)
107 | self.muteButton = QtWidgets.QToolButton(NewProject)
108 | self.muteButton.setText("")
109 | self.muteButton.setObjectName("muteButton")
110 | self.gridLayout.addWidget(self.muteButton, 3, 2, 1, 1)
111 | self.comboBox = QtWidgets.QComboBox(NewProject)
112 | self.comboBox.setObjectName("comboBox")
113 | self.gridLayout.addWidget(self.comboBox, 3, 15, 1, 1)
114 | self.pushButton_2 = QtWidgets.QPushButton(NewProject)
115 | self.pushButton_2.setObjectName("pushButton_2")
116 | self.gridLayout.addWidget(self.pushButton_2, 3, 13, 1, 1)
117 | self.toolButton_3 = QtWidgets.QToolButton(NewProject)
118 | icon1 = QtGui.QIcon()
119 | icon1.addPixmap(QtGui.QPixmap(":/plugins/VideoGis/mIconFormSelect.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
120 | self.toolButton_3.setIcon(icon1)
121 | self.toolButton_3.setObjectName("toolButton_3")
122 | self.gridLayout.addWidget(self.toolButton_3, 3, 11, 1, 1)
123 |
124 | # <<
125 | self.toolButton = QtWidgets.QToolButton(NewProject)
126 | icon5 = QtGui.QIcon()
127 | icon5.addPixmap(QtGui.QPixmap(":/VgisIcon/mActionAtlasPrev.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
128 | self.toolButton.setIcon(icon5)
129 | self.toolButton.setObjectName("toolButton")
130 | self.gridLayout.addWidget(self.toolButton, 3, 6, 1, 1)
131 |
132 | # >>
133 | self.toolButton_2 = QtWidgets.QToolButton(NewProject)
134 | icon2 = QtGui.QIcon()
135 | icon2.addPixmap(QtGui.QPixmap(":/VgisIcon/mActionAtlasNext.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
136 | self.toolButton_2.setIcon(icon2)
137 | self.toolButton_2.setObjectName("toolButton_2")
138 | self.gridLayout.addWidget(self.toolButton_2, 3, 9, 1, 1)
139 |
140 | # <<<
141 | self.toolButton_6 = QtWidgets.QToolButton(NewProject)
142 | icon2 = QtGui.QIcon()
143 | icon2.addPixmap(QtGui.QPixmap(":/VgisIcon/mActionAtlasNext.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
144 | self.toolButton_6.setIcon(icon2)
145 | self.toolButton_6.setObjectName("toolButton_6")
146 | self.gridLayout.addWidget(self.toolButton_6, 3, 5, 1, 1)
147 |
148 | # >>>
149 | self.toolButton_5 = QtWidgets.QToolButton(NewProject)
150 | icon2 = QtGui.QIcon()
151 | icon2.addPixmap(QtGui.QPixmap(":/VgisIcon/mActionAtlasNext.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
152 | self.toolButton_5.setIcon(icon2)
153 | self.toolButton_5.setObjectName("toolButton_5")
154 | self.gridLayout.addWidget(self.toolButton_5, 3, 10, 1, 1)
155 |
156 | # >
157 | self.SkipFortoolButton_8 = QtWidgets.QToolButton(NewProject)
158 | self.SkipFortoolButton_8.setStyleSheet("")
159 | icon3 = QtGui.QIcon()
160 | icon3.addPixmap(QtGui.QPixmap(":/VgisIcon/mActionArrowRight.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
161 | self.SkipFortoolButton_8.setIcon(icon3)
162 | self.SkipFortoolButton_8.setObjectName("SkipFortoolButton_8")
163 | self.gridLayout.addWidget(self.SkipFortoolButton_8, 3, 8, 1, 1)
164 |
165 | self.SkipBacktoolButton_7 = QtWidgets.QToolButton(NewProject)
166 | self.SkipBacktoolButton_7.setStyleSheet("")
167 | icon4 = QtGui.QIcon()
168 | icon4.addPixmap(QtGui.QPixmap(":/VgisIcon/mActionArrowLeft.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
169 | self.SkipBacktoolButton_7.setIcon(icon4)
170 | self.SkipBacktoolButton_7.setObjectName("SkipBacktoolButton_7")
171 | self.gridLayout.addWidget(self.SkipBacktoolButton_7, 3, 7, 1, 1)
172 |
173 |
174 | self.pushButton = QtWidgets.QPushButton(NewProject)
175 | self.pushButton.setObjectName("pushButton")
176 | self.gridLayout.addWidget(self.pushButton, 3, 0, 1, 1)
177 | self.toolButton_4 = QtWidgets.QToolButton(NewProject)
178 | self.toolButton_4.setObjectName("toolButton_4")
179 | self.gridLayout.addWidget(self.toolButton_4, 3, 12, 1, 1)
180 | self.checkBox = QtWidgets.QCheckBox(NewProject)
181 | self.checkBox.setObjectName("checkBox")
182 | self.gridLayout.addWidget(self.checkBox, 3, 14, 1, 1)
183 | self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1)
184 |
185 | self.retranslateUi(NewProject)
186 | QtCore.QMetaObject.connectSlotsByName(NewProject)
187 |
188 | def retranslateUi(self, NewProject):
189 | _translate = QtCore.QCoreApplication.translate
190 | NewProject.setWindowTitle(_translate("NewProject", "Video UAV Tracker - New Project"))
191 | self.replayPlay_pushButton.setText(_translate("NewProject", "Play/Pause"))
192 | self.replayPosition_label.setText(_translate("NewProject", "-:- / -:-"))
193 | self.pushButton_2.setToolTip(_translate("NewProject", "Synchronize actual video frame with selected GPS time
"))
194 | self.comboBox.setToolTip(_translate("NewProject", " GPS time
"))
195 | self.pushButton_2.setText(_translate("NewProject", "Synchronize!"))
196 | self.toolButton_3.setToolTip(_translate("NewProject", "Add point shape database to project
"))
197 | #self.toolButton_3.setText(_translate("NewProject", "DB"))
198 |
199 | self.toolButton_2.setToolTip(_translate("NewProject", "Next second
"))
200 | self.toolButton_2.setText(_translate("NewProject", ">>"))
201 |
202 | self.toolButton_6.setToolTip(_translate("NewProject", "Previous 1min
"))
203 | self.toolButton_6.setText(_translate("NewProject", "<<<"))
204 |
205 | self.toolButton_5.setToolTip(_translate("NewProject", "Next 1min
"))
206 | self.toolButton_5.setText(_translate("NewProject", ">>>"))
207 |
208 | self.SkipFortoolButton_8.setToolTip(_translate("NewProject", "Next frame
"))
209 | self.SkipFortoolButton_8.setText(_translate("NewProject", ">"))
210 | self.SkipBacktoolButton_7.setToolTip(_translate("NewProject", "Previous frame
"))
211 | self.SkipBacktoolButton_7.setText(_translate("NewProject", "<"))
212 | self.toolButton.setToolTip(_translate("NewProject", "Previous second
"))
213 | self.toolButton.setText(_translate("NewProject", "<<"))
214 | self.pushButton.setToolTip(_translate("NewProject", "Select video and relative gpx
"))
215 | self.pushButton.setText(_translate("NewProject", "Select Video and GPX"))
216 | self.toolButton_4.setText(_translate("NewProject", "3D"))
217 | self.checkBox.setToolTip(_translate("NewProject","Activate Pixel value conversion and display (see README)
"))
--------------------------------------------------------------------------------
/Video_UAV_Tracker/vut_newproject.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | NewProject
4 |
5 |
6 |
7 | 0
8 | 0
9 | 912
10 | 458
11 |
12 |
13 |
14 | VUT 3D - New Project
15 |
16 |
17 |
18 | :/plugins/VideoGis/icon.png:/plugins/VideoGis/icon.png
19 |
20 |
21 | -
22 |
23 |
-
24 |
25 |
-
26 |
27 |
28 |
29 | 0
30 | 0
31 |
32 |
33 |
34 | background-color: rgb(0, 0, 0);
35 |
36 |
37 |
38 |
39 | 0
40 | 0
41 | 891
42 | 381
43 |
44 |
45 |
46 | true
47 |
48 |
49 |
50 |
51 | 0
52 | 0
53 | 889
54 | 379
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 | -
64 |
65 |
66 | Qt::Horizontal
67 |
68 |
69 |
70 | -
71 |
72 |
73 |
74 | 0
75 | 0
76 |
77 |
78 |
79 | Play/Pause
80 |
81 |
82 | false
83 |
84 |
85 | false
86 |
87 |
88 |
89 | -
90 |
91 |
92 | -:- / -:-
93 |
94 |
95 |
96 | -
97 |
98 |
99 |
100 |
101 |
102 |
103 | -
104 |
105 |
106 | -
107 |
108 |
109 | <html><head/><body><p>Synchronize actual video frame with selected GPS time</p></body></html>
110 |
111 |
112 | Synchronize!
113 |
114 |
115 |
116 | -
117 |
118 |
119 | <html><head/><body><p>Add point shape database to project</p></body></html>
120 |
121 |
122 | DB
123 |
124 |
125 |
126 | :/plugins/VideoGis/mIconFormSelect.svg:/plugins/VideoGis/mIconFormSelect.svg
127 |
128 |
129 |
130 | -
131 |
132 |
133 | <html><head/><body><p>Next 10sec</p></body></html>
134 |
135 |
136 | >>
137 |
138 |
139 |
140 | :/VgisIcon/mActionAtlasNext.svg:/VgisIcon/mActionAtlasNext.svg
141 |
142 |
143 |
144 | -
145 |
146 |
147 | <html><head/><body><p>Next 5sec</p></body></html>
148 |
149 |
150 |
151 |
152 |
153 | >
154 |
155 |
156 |
157 | :/VgisIcon/mActionArrowRight.svg:/VgisIcon/mActionArrowRight.svg
158 |
159 |
160 |
161 | -
162 |
163 |
164 | <html><head/><body><p>Previous 5sec</p></body></html>
165 |
166 |
167 |
168 |
169 |
170 | <
171 |
172 |
173 |
174 | :/VgisIcon/mActionArrowLeft.svg:/VgisIcon/mActionArrowLeft.svg
175 |
176 |
177 |
178 | -
179 |
180 |
181 | <html><head/><body><p>Previous 10sec</p></body></html>
182 |
183 |
184 | <<
185 |
186 |
187 |
188 | :/VgisIcon/mActionAtlasPrev.svg:/VgisIcon/mActionAtlasPrev.svg
189 |
190 |
191 |
192 | -
193 |
194 |
195 | <html><head/><body><p>Select video and relative gpx</p></body></html>
196 |
197 |
198 | Select Video and GPX
199 |
200 |
201 |
202 | -
203 |
204 |
205 | 3D
206 |
207 |
208 |
209 | -
210 |
211 |
212 | <html><head/><body><p>Activate Pixel value conversion and display (see README)</p></body></html>
213 |
214 |
215 |
216 |
217 |
218 |
219 | -
220 |
221 |
222 | <html><head/><body><p>Next 60min</p></body></html>
223 |
224 |
225 | >>>
226 |
227 |
228 |
229 | -
230 |
231 |
232 | <html><head/><body><p>Previous 60min</p></body></html>
233 |
234 |
235 | <<<
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
--------------------------------------------------------------------------------