From 911cb264aef2eda2fe208c0d425641841a52fc7a Mon Sep 17 00:00:00 2001
From: Sara <sarasdj@stud.ntnu.no>
Date: Thu, 29 Feb 2024 11:34:14 +0100
Subject: [PATCH] update: only render polygon in py

---
 server/main.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/server/main.py b/server/main.py
index fd71d17c..af5739ff 100644
--- a/server/main.py
+++ b/server/main.py
@@ -70,9 +70,12 @@ if __name__ == "__main__":
     # Load GeoJSON data using geopandas
     geo_data = gpd.read_file("server/map/mjosa.geojson")
 
-    # Plot choropleth map
-    geo_data.plot()
-    plt.title('Test_map')
+    # Filter only polygons
+    polygon_data = geo_data[geo_data['geometry'].geom_type == 'Polygon']
+
+    # Plot polygons
+    polygon_data.plot()
+    plt.title('Polygons in Mjøsa GeoJSON')
     plt.xlabel('Longitude')
     plt.ylabel('Latitude')
     plt.show()
-- 
GitLab