Skip to content

Commit

Permalink
Improve precision of coordinates rounding
Browse files Browse the repository at this point in the history
  • Loading branch information
justinefricou committed Aug 12, 2024
1 parent 3a29a7a commit c974e6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion geotrek/core/path_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,6 @@ def merge_line_strings(self, line_strings):

def round_line_string_coordinates(self, line_string):
coords = line_string.coords
new_coords = [[round(nb, 0) for nb in pt_coord] for pt_coord in coords]
new_coords = [[round(nb, 4) for nb in pt_coord] for pt_coord in coords]
new_line_string = LineString(new_coords, srid=line_string.srid)
return new_line_string

0 comments on commit c974e6e

Please sign in to comment.