You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
This is not related to a problem, but it is a feature that I have developed for myself after searched for an existing solution in other libraries.
Describe the solution you'd like
I want to trace Line, Polyline or MultiLines on a Vector file. Then import this file (gu.Vector) and export all the encountered values where theses lines cross a Raster. Then we can plot theses profiles along a distance array. See this example :
import matplotlib.pyplot as plt
import geoutils as gu
profiles_axis = gu.Vector('profiles_axis.gpkg')
raster = gu.Raster('raster.tif')
distances, profiles = raster.extract_profile(profiles_axis)
for i in range(len(distances)) :
plt.plot(distances[i], profiles[i])
plt.show()
Describe alternatives you've considered
In my project I use start and end points, to select Rasters values over the segment delimited by these two points.
Additional context
An example of the profiles that I have traced on few DEMs along 2 tracks. These two tracks are defined by a starting and ending point, extracted from a gu.Vector file using
profiles_axis_gpkg = gu.Vector('profiles_axis.gpkg')
for line in profiles_axis_gpkg.ds.geometry :
coords = list(line.coords)
See an example result :
The text was updated successfully, but these errors were encountered:
Hi,
I agree, this would be a useful functionality that many people would use. This would not be too complicated to implement, using our point interpolation.
If you feel like making a contribution to the code, feel free to submit a pull request 😉 Otherwise, we'll look into this but don't expect anything before the end of summer!
Is your feature request related to a problem? Please describe.
This is not related to a problem, but it is a feature that I have developed for myself after searched for an existing solution in other libraries.
Describe the solution you'd like
I want to trace Line, Polyline or MultiLines on a Vector file. Then import this file (gu.Vector) and export all the encountered values where theses lines cross a Raster. Then we can plot theses profiles along a distance array. See this example :
Describe alternatives you've considered
In my project I use start and end points, to select Rasters values over the segment delimited by these two points.
Additional context
An example of the profiles that I have traced on few DEMs along 2 tracks. These two tracks are defined by a starting and ending point, extracted from a gu.Vector file using
See an example result :
The text was updated successfully, but these errors were encountered: