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
The printout of the new geometry shows this is still a straight line between two points, only with coordinates in a projected CRS.
print(zion_transect_utm)
Next, we need to calculate the distances, along the line, where points are going to be generated.
We do this using np.arange.
The result is a numeric sequence starting at 0, going up to line .length, in steps of 250 ($m$).
distances=np.arange(0, zion_transect_utm.length, 250)
distances[:7] ## First 7 distance cutoff points
The distance cutoffs are used to sample ("interpolate") points along the line.
The shapely.interpolate method is used to generate the points, which then are reprojected back to the geographic CRS of the raster (EPSG:4326).
The printout of the new geometry shows this is still a straight line between two points, only with coordinates in a projected CRS.
Next, we need to calculate the distances, along the line, where points are going to be generated.$m$ ).
We do this using
np.arange
.The result is a numeric sequence starting at
0
, going up to line.length
, in steps of250
(The distance cutoffs are used to sample ("interpolate") points along the line.
The shapely
.interpolate
method is used to generate the points, which then are reprojected back to the geographic CRS of the raster (EPSG:4326
).It would be useful to have this kind of function in GeometryOps. For now, I'm just going to use segmentize.
The text was updated successfully, but these errors were encountered: