Skip to content

Commit

Permalink
fix: use gpd.points_from_xy
Browse files Browse the repository at this point in the history
  • Loading branch information
AngRodrigues committed Jun 3, 2024
1 parent 722b98c commit 2f931c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion map2loop/thickness_calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2f931c5

Please sign in to comment.