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 28, 2024
1 parent 7387fd3 commit f5752d2
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 f5752d2

Please sign in to comment.