From 2f931c59025997133aeea9c10f725858613b7f6b Mon Sep 17 00:00:00 2001 From: AngRodrigues Date: Tue, 4 Jun 2024 09:09:59 +1000 Subject: [PATCH] fix: use gpd.points_from_xy --- map2loop/thickness_calculator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/map2loop/thickness_calculator.py b/map2loop/thickness_calculator.py index c4cac830..9f93d17e 100644 --- a/map2loop/thickness_calculator.py +++ b/map2loop/thickness_calculator.py @@ -243,7 +243,7 @@ def compute( # get the sampled contacts contacts = geopandas.GeoDataFrame(map_data.sampled_contacts) # build points from x and y coordinates - geometry2 = contacts.apply(lambda row: shapely.Point(row.X, row.Y), axis=1) + geometry2 = geopandas.points_from_xy(contacts['X'], contacts['Y']) contacts.set_geometry(geometry2, inplace=True) # set the crs of the contacts to the crs of the units