Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
exercisemodel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
stw
wt
exercisemodel
Commits
491bd7d8
Commit
491bd7d8
authored
Dec 14, 2017
by
Tomas Pettersson
🏸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testing
parent
ce5b8390
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
19 deletions
+21
-19
cloudtrack.dat
cloudtrack.dat
+14
-14
exercisemodel/model.py
exercisemodel/model.py
+7
-5
No files found.
cloudtrack.dat
View file @
491bd7d8
...
@@ -5,19 +5,19 @@
...
@@ -5,19 +5,19 @@
2017-12-14 14:00 18.3273 58.7730 0.0000
2017-12-14 14:00 18.3273 58.7730 0.0000
2017-12-14 14:15 18.3063 58.7805 0.0000
2017-12-14 14:15 18.3063 58.7805 0.0000
2017-12-14 14:30 18.2833 58.7880 0.0000
2017-12-14 14:30 18.2833 58.7880 0.0000
2017-12-14 14:45 18.2648 58.793
6
0.0000
2017-12-14 14:45 18.2648 58.793
7
0.0000
2017-12-14 15:00 18.2476 58.799
3
0.0000
2017-12-14 15:00 18.2476 58.799
4
0.0000
2017-12-14 15:15 18.2335 58.8036 0.0000
2017-12-14 15:15 18.2335 58.8036 0.0000
2017-12-14 15:30 18.2256 58.806
5
0.0000
2017-12-14 15:30 18.2256 58.806
4
0.0000
2017-12-14 15:45 18.2184 58.8093 0.0000
2017-12-14 15:45 18.2184 58.8093 0.0000
2017-12-14 16:00 18.2157 58.8107 0.0000
2017-12-14 16:00 18.2157 58.8107 0.0000
2017-12-14 16:15 18.2136 58.8118 0.0000
2017-12-14 16:15 18.2136 58.8118 0.0000
2017-12-14 16:30 18.2105 58.8132 0.0000
2017-12-14 16:30 18.2105 58.8132 0.0000
2017-12-14 16:45 18.209
1
58.8141 0.0000
2017-12-14 16:45 18.209
2
58.8141 0.0000
2017-12-14 17:00 18.2071 58.8152 0.0000
2017-12-14 17:00 18.2071 58.8152 0.0000
2017-12-14 17:15 18.2054 58.8161 0.0000
2017-12-14 17:15 18.2054 58.8161 0.0000
2017-12-14 17:30 18.206
8
58.8169 0.0000
2017-12-14 17:30 18.206
7
58.8169 0.0000
2017-12-14 17:45 18.209
2
58.8177 0.0000
2017-12-14 17:45 18.209
1
58.8177 0.0000
2017-12-14 18:00 18.2102 58.8187 0.0000
2017-12-14 18:00 18.2102 58.8187 0.0000
2017-12-14 18:15 18.2102 58.8209 0.0000
2017-12-14 18:15 18.2102 58.8209 0.0000
2017-12-14 18:30 18.2102 58.8225 0.0000
2017-12-14 18:30 18.2102 58.8225 0.0000
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
2017-12-14 19:45 18.2112 58.8290 0.0000
2017-12-14 19:45 18.2112 58.8290 0.0000
2017-12-14 20:00 18.2109 58.8303 0.0000
2017-12-14 20:00 18.2109 58.8303 0.0000
2017-12-14 20:15 18.2105 58.8313 0.0000
2017-12-14 20:15 18.2105 58.8313 0.0000
2017-12-14 20:30 18.209
2
58.8328 0.0000
2017-12-14 20:30 18.209
1
58.8328 0.0000
2017-12-14 20:45 18.2081 58.8340 0.0000
2017-12-14 20:45 18.2081 58.8340 0.0000
2017-12-14 21:00 18.2061 58.8351 0.0000
2017-12-14 21:00 18.2061 58.8351 0.0000
2017-12-14 21:15 18.2043 58.8361 0.0000
2017-12-14 21:15 18.2043 58.8361 0.0000
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
2017-12-15 03:45 18.1532 58.8544 0.0000
2017-12-15 03:45 18.1532 58.8544 0.0000
2017-12-15 04:00 18.1518 58.8557 0.0000
2017-12-15 04:00 18.1518 58.8557 0.0000
2017-12-15 04:15 18.1501 58.8566 0.0000
2017-12-15 04:15 18.1501 58.8566 0.0000
2017-12-15 04:30 18.1487 58.857
5
0.0000
2017-12-15 04:30 18.1487 58.857
4
0.0000
2017-12-15 04:45 18.1470 58.8583 0.0000
2017-12-15 04:45 18.1470 58.8583 0.0000
2017-12-15 05:00 18.1456 58.8592 0.0000
2017-12-15 05:00 18.1456 58.8592 0.0000
2017-12-15 05:15 18.1443 58.8601 0.0000
2017-12-15 05:15 18.1443 58.8601 0.0000
...
@@ -74,23 +74,23 @@
...
@@ -74,23 +74,23 @@
2017-12-15 07:15 18.1375 58.8638 0.0000
2017-12-15 07:15 18.1375 58.8638 0.0000
2017-12-15 07:30 18.1373 58.8641 0.0000
2017-12-15 07:30 18.1373 58.8641 0.0000
2017-12-15 07:45 18.1370 58.8643 0.0000
2017-12-15 07:45 18.1370 58.8643 0.0000
2017-12-15 08:00 18.1366 58.864
5
0.0000
2017-12-15 08:00 18.1366 58.864
6
0.0000
2017-12-15 08:15 18.1363 58.8648 0.0000
2017-12-15 08:15 18.1363 58.8648 0.0000
2017-12-15 08:30 18.1358 58.8649 0.0000
2017-12-15 08:30 18.1358 58.8649 0.0000
2017-12-15 08:45 18.1353 58.8650 0.0000
2017-12-15 08:45 18.1353 58.8650 0.0000
2017-12-15 09:00 18.1348 58.8652 0.0000
2017-12-15 09:00 18.1348 58.8652 0.0000
2017-12-15 09:15 18.1345 58.865
5
0.0000
2017-12-15 09:15 18.1345 58.865
4
0.0000
2017-12-15 09:30 18.1343 58.8656 0.0000
2017-12-15 09:30 18.1343 58.8656 0.0000
2017-12-15 09:45 18.134
1 58.8658
0.0000
2017-12-15 09:45 18.134
0 58.8657
0.0000
2017-12-15 10:00 18.1338 58.8659 0.0000
2017-12-15 10:00 18.1338 58.8659 0.0000
2017-12-15 10:15 18.1335 58.8660 0.0000
2017-12-15 10:15 18.1335 58.8660 0.0000
2017-12-15 10:30 18.1333 58.8662 0.0000
2017-12-15 10:30 18.1333 58.8662 0.0000
2017-12-15 10:45 18.133
2
58.8663 0.0000
2017-12-15 10:45 18.133
1
58.8663 0.0000
2017-12-15 11:00 18.1330 58.8664 0.0000
2017-12-15 11:00 18.1330 58.8664 0.0000
2017-12-15 11:15 18.1328 58.8665 0.0000
2017-12-15 11:15 18.1328 58.8665 0.0000
2017-12-15 11:30 18.1327 58.8666 0.0000
2017-12-15 11:30 18.1327 58.8666 0.0000
2017-12-15 11:45 18.132
7
58.8666 0.0000
2017-12-15 11:45 18.132
6
58.8666 0.0000
2017-12-15 12:00 18.1326 58.866
7
0.0000
2017-12-15 12:00 18.1326 58.866
6
0.0000
2017-12-15 12:15 18.1326 58.8667 0.0000
2017-12-15 12:15 18.1326 58.8667 0.0000
2017-12-15 12:30 18.1326 58.8667 0.0000
2017-12-15 12:30 18.1326 58.8667 0.0000
2017-12-15 12:45 18.1326 58.8667 0.0000
2017-12-15 12:45 18.1326 58.8667 0.0000
...
...
exercisemodel/model.py
View file @
491bd7d8
...
@@ -283,18 +283,21 @@ class Model(object):
...
@@ -283,18 +283,21 @@ class Model(object):
timearray
=
exercisefeature
[
'properties'
][
'time'
]
timearray
=
exercisefeature
[
'properties'
][
'time'
]
properties
=
self
.
createProperties
(
1
,
starttime
,
multipoint
.
centroid
,
[
0
]
*
len
(
multipoint
.
geoms
),
[
2
]
*
len
(
multipoint
.
geoms
))
properties
=
self
.
createProperties
(
1
,
starttime
,
multipoint
.
centroid
,
[
0
]
*
len
(
multipoint
.
geoms
),
[
2
]
*
len
(
multipoint
.
geoms
))
features
.
append
(
self
.
createFeature
(
multipoint
,
properties
))
features
.
append
(
self
.
createFeature
(
multipoint
,
properties
))
mp
=
multipoint
activepoints
=
[]
activepoints
=
[]
deactivepoints
=
[]
deactivepoints
=
[]
for
point
in
multipoint
.
geoms
:
activepoints
.
append
([
point
.
x
,
point
.
y
])
linestring
=
geometry
.
shape
(
exercisefeature
[
'geometry'
])
linestring
=
geometry
.
shape
(
exercisefeature
[
'geometry'
])
latlngpoints
=
[[
latlng
[
1
],
latlng
[
0
]]
for
latlng
in
linestring
.
coords
]
latlngpoints
=
[[
latlng
[
1
],
latlng
[
0
]]
for
latlng
in
linestring
.
coords
]
# print('before matches')
# print('before matches')
matches
=
strtree
.
query
(
LineString
(
latlngpoints
))
matches
=
strtree
.
query
(
LineString
(
latlngpoints
))
# print('matches: '+str(matches))
# print('matches: '+str(matches))
for
i
,
coord
in
enumerate
(
linestring
.
coords
):
for
i
,
coord
in
enumerate
(
linestring
.
coords
):
start
=
time
.
time
()
#
start = time.time()
if
(
len
(
mp
.
geom
s
)
>
0
):
if
(
len
(
activepoint
s
)
>
0
):
# print('active: '+str(len(mp.geoms)))
# print('active: '+str(len(mp.geoms)))
mp
=
geometry
.
MultiPoint
(
activepoints
)
points
=
self
.
centerPoints
(
coord
,
mp
.
centroid
,
mp
.
geoms
)
points
=
self
.
centerPoints
(
coord
,
mp
.
centroid
,
mp
.
geoms
)
displacedpoints
=
self
.
displacePoints
(
pDist
,
points
)
displacedpoints
=
self
.
displacePoints
(
pDist
,
points
)
# print('displacedpoints: '+str(len(displacedpoints)))
# print('displacedpoints: '+str(len(displacedpoints)))
...
@@ -304,7 +307,7 @@ class Model(object):
...
@@ -304,7 +307,7 @@ class Model(object):
deactivepoints
+=
onlandpoints
deactivepoints
+=
onlandpoints
# print('active: '+str(len(activepoints)))
# print('active: '+str(len(activepoints)))
# print('onland: '+str(len(onlandpoints)))
# print('onland: '+str(len(onlandpoints)))
end
=
time
.
time
()
#
end = time.time()
# print('onland: '+str(end-start))
# print('onland: '+str(end-start))
mp
=
geometry
.
MultiPoint
(
activepoints
+
deactivepoints
)
mp
=
geometry
.
MultiPoint
(
activepoints
+
deactivepoints
)
# print('active+deactive: '+str(len(mp.geoms)))
# print('active+deactive: '+str(len(mp.geoms)))
...
@@ -315,7 +318,6 @@ class Model(object):
...
@@ -315,7 +318,6 @@ class Model(object):
if
(
i
%
10
==
0
):
if
(
i
%
10
==
0
):
Cloudtrack
.
write
(
featurecollection
)
Cloudtrack
.
write
(
featurecollection
)
Particletrack
.
write
(
featurecollection
)
Particletrack
.
write
(
featurecollection
)
mp
=
geometry
.
MultiPoint
(
activepoints
)
print
(
'deactivepoints: '
+
str
(
len
(
deactivepoints
)))
print
(
'deactivepoints: '
+
str
(
len
(
deactivepoints
)))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment