Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PROG2900
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sara Savanovic Djordjevic
PROG2900
Commits
14f7a8a0
Commit
14f7a8a0
authored
1 year ago
by
Hoa Ben The Nguyen
Browse files
Options
Downloads
Patches
Plain Diff
removed: self calculation of points
parent
99f6d4c9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
server/data_processing/area_processing.py
+2
-2
2 additions, 2 deletions
server/data_processing/area_processing.py
server/data_processing/process_lidar_data.py
+3
-3
3 additions, 3 deletions
server/data_processing/process_lidar_data.py
with
5 additions
and
5 deletions
server/data_processing/area_processing.py
+
2
−
2
View file @
14f7a8a0
...
...
@@ -50,7 +50,7 @@ def define_gridareas(lat, lng, area_offset, grid_size):
lat_pos
=
main_area
[
3
][
0
]
+
relative_size_lat
*
area_size
[
0
]
+
dist_to_subcenter
[
0
]
lng_pos
=
main_area
[
3
][
1
]
+
relative_size_lng
*
area_size
[
1
]
+
dist_to_subcenter
[
1
]
# id of each subarea
sub_id
=
x
%
grid_size
+
grid_size
*
y
#
sub_id = x % grid_size + grid_size * y
if
(
x
+
(
y
*
grid_size
))
%
((
grid_size
*
2
)
+
1
)
==
grid_size
*
2
:
group_id
+=
2
...
...
@@ -60,7 +60,7 @@ def define_gridareas(lat, lng, area_offset, grid_size):
# use the center of sub areas to find the corner of each subarea
corners
=
calculate_corners
(
lat_pos
,
lng_pos
,
subarea_offset
)
grided_area
.
append
((
sub_id
,
group_id
+
i
%
2
,
corners
))
grided_area
.
append
((
group_id
+
i
%
2
,
corners
))
return
grided_area
#[1,2,2,3,4,5,6,3,4,6,8,9,5,3,5.7,8,5,3]
...
...
This diff is collapsed.
Click to expand it.
server/data_processing/process_lidar_data.py
+
3
−
3
View file @
14f7a8a0
...
...
@@ -124,8 +124,8 @@ def calculate_area_data(center, cell_size, body_of_water):
# find the heights of each sub-area => area-heights
for
sub_area
in
grid_area_heights
:
start
=
min
(
sub_area
[
2
])
end
=
max
(
sub_area
[
2
])
start
=
min
(
sub_area
[
1
])
end
=
max
(
sub_area
[
1
])
#test data
# zone coordinates sett to be relative to the lidar data
...
...
@@ -143,7 +143,7 @@ def calculate_area_data(center, cell_size, body_of_water):
# filter data within sub-area zones
points_in_area
=
list
(
filter
(
lambda
point_position
:
inArea
(
point_position
,
areazone
),
ice_points
))
area_heights
.
append
((
current_zone_id
,
sub_area
[
1
],
sub_center
,
find_height
(
points_in_area
)))
area_heights
.
append
((
current_zone_id
,
sub_area
[
0
],
sub_center
,
find_height
(
points_in_area
)))
return
area_heights
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment