-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
ariadne-cartograph/update_ways_metadata.py
Lines 25 to 28 in 448ba94
| coordinates = json.loads(geojson)['coordinates'] | |
| values = [] | |
| for coord in coordinates: | |
| values.append(provider.get_value(*coord)) |
Currently, our sampling algorithm uses the coordinates (points) in LineString objects. This poses an issue since LineStrings can contain different number of points, and the points may not be at evenly spaced intervals.
A better sampling algorithm can sample values from N equally spaced, points along the LineString, which should provide a better estimate of the value of the LineString overall.
The following function in the Shapely library could be useful:
https://toblerity.org/shapely/manual.html#object.interpolate
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request