diff --git a/server/data_processing/area_processing.py b/server/data_processing/area_processing.py
index 649e18a6dcb251a7902de9e1df024bc0d5c24d30..30a5679476b1b154da7a0613727fb2ca8aaa0b5b 100644
--- a/server/data_processing/area_processing.py
+++ b/server/data_processing/area_processing.py
@@ -12,11 +12,12 @@ def calculate_corners(lat, lng, area_offset):
     """
     # From https://stackoverflow.com/questions/7477003/calculating-new-longitude-latitude-from-old-n-meters
     # Formulas:
-    lat_pos = lat + (area_offset * METER)
-    lng_pos = lng + (area_offset * METER) / cos(lat * (pi / 180))
+    offset_lng, offset_lat = area_offset
+    lat_pos = lat + (offset_lat * METER)
+    lng_pos = lng + (offset_lng * METER) / cos(lat * (pi / 180))
 
-    lat_neg = lat - (area_offset * METER)
-    lng_neg = lng - (area_offset * METER) / cos(lat * (pi / 180))
+    lat_neg = lat - (offset_lat * METER)
+    lng_neg = lng - (offset_lng * METER) / cos(lat * (pi / 180))
 
     return [
         (lat_neg, lng_pos), # top left
diff --git a/server/data_processing/process_lidar_data.py b/server/data_processing/process_lidar_data.py
index 51d927cd81d90257b3eae3de04accf27eb5c1840..cb09c88662e6b2bc4be2be1f58b32a65fd79fba3 100644
--- a/server/data_processing/process_lidar_data.py
+++ b/server/data_processing/process_lidar_data.py
@@ -42,13 +42,10 @@ def inArea(position, areaRange):
 def distance(point1, point2):
     y1, x1 = point1
     y2, x2 = point2
-    print(y1," 2 ",x1)
-    print(y2," 3 ",x2)
     return math.sqrt(abs(y2 - y1)**2 + abs(x2 - x1)**2)
 
 # find the closest point in json list
 def closest_points(point, list, coords_taken):
-    print(point, " 4 ")
     closest_point = None
     closest_dist = float('inf')
     for current_point in list:
@@ -64,7 +61,7 @@ def find_height(points):
     height_differences = [] # final container for height data
 
     # sort the points
-    sorted_coords = sorted(points, key=lambda coord: (coord[0],coord[1]))
+    sorted_coords = sorted(points, key=lambda coord: (coord[0], coord[1]))
 
     # group the sorted points that has the same xy- coordinates together
     groupCoords = [list(group) for key, group in groupby(sorted_coords, key=lambda coord: (coord[0], coord[1]))]
@@ -87,34 +84,32 @@ def find_height(points):
 
 # find the height of an area based on the coordinates of it's center
 # and it's affiliations (subId and groupId) (soon to be implemented
-def calculate_area_data(center, cell_size, body_of_water):
-    # map application size to meters
-    cell_size_to_meters = cell_size * 600000
-
+def calculate_area_data(center, body_of_water):
     # container for all the heights in area
     area_heights = []
 
     # zone coords taken
     taken_coords = []
 
-    # set the limit of the area compared to local coordinates
-    area_limit = calculate_corners(center[0],center[1], cell_size_to_meters)
     # read json data with path to data for specific water body
     file_name = "server/lake_relations/" + body_of_water + "_div.json"
     with open(file_name) as data:
         map_data = json.load(data)
 
+    # grid cell offset
+    cell_x, cell_y = map_data['tile_width'], map_data['tile_height']
+
+    # set the limit of the area compared to local coordinates
+    area_limit = calculate_corners(center[0], center[1], (cell_x, cell_y))
+
     map_data = map_data['features']
+
     print(map_data[0]['properties']['sub_div_center'])
 
     map_zones = [area_limit[1],area_limit[3]]
 
-    print(map_zones)
-
     map_data = list(filter(lambda point_position: inArea((point_position['properties']['sub_div_center'][0], point_position['properties']['sub_div_center'][1],0.0), map_zones), map_data))
 
-    print(len(map_data))
-
     # Refactor lidar data to a readable format
     iceOver = laspy.read(lazData_path[0])
     iceUnder = laspy.read(lazData_path[1])
@@ -125,7 +120,7 @@ def calculate_area_data(center, cell_size, body_of_water):
     min_point = min(ice_points)
 
     # define all the sub-areas within the area, local coordinates
-    grid_area_heights = define_gridareas(60,10, 1500,4)
+    grid_area_heights = define_gridareas(60,10, (cell_x, cell_y),4)
 
     # find the heights of each sub-area => area-heights
     for sub_area in grid_area_heights:
@@ -159,5 +154,5 @@ def calculate_area_data(center, cell_size, body_of_water):
 
     return area_heights
 
-#print(calculate_area_data((61,11), 0.04,'mjosa'))
+print(calculate_area_data((61,11), 0.04,'mjosa'))
 
diff --git a/server/map/input_new_data.py b/server/map/input_new_data.py
index 0c5275e46f621c715b3a8b5913cb2ed4b9094142..36af3b4ead53a5e0e7075a1b887f91454e2f76f5 100644
--- a/server/map/input_new_data.py
+++ b/server/map/input_new_data.py
@@ -28,7 +28,7 @@ def input_new_Lidar_data(self, cursor, bodyOfWater):
         measurement_id = cursor.lastrowid
 
         # calculate the area of to be calculated based on the coordinates given to the calculation model
-        areas_data = calculate_area_data((latitude, longitude), 0.04, bodyOfWater)
+        areas_data = calculate_area_data((latitude, longitude), bodyOfWater)
         print(len(areas_data))
         lidar_json_data = []