Skip to content
Snippets Groups Projects
Commit 14f7a8a0 authored by Hoa Ben The Nguyen's avatar Hoa Ben The Nguyen
Browse files

removed: self calculation of points

parent 99f6d4c9
No related branches found
No related tags found
No related merge requests found
......@@ -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]
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment