Added create ortho lines algorithms#30
Conversation
phobson
left a comment
There was a problem hiding this comment.
here are some more comments besides the PEP8 formatting stuff.
| bank = geometry.Polygon([(-2,0),(0,3),(6,6),(11,16),(13,16),(13,3),(4,1),(-1,-1),(-2,0)]) | ||
| ortho_ln_set = vector.create_ortho_grid(line, bank, step = 0.01, grid_dist = 1, buffer_dist = 1, max_dist = 10) | ||
| gdf_ortho_ln = geopandas.GeoDataFrame(geometry=ortho_ln_set) | ||
| print(gdf_ortho_ln) |
There was a problem hiding this comment.
Don't include print statements in library code
| def line_to_point(line_geom,interval_dist): | ||
| """ | ||
| Create a series of points x distance apart along a line geometry | ||
| """ |
There was a problem hiding this comment.
docstrings should be in the numpy doc format: https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt
| return points | ||
|
|
||
| def compute_ortho_bearing(bearings): | ||
| """ |
There was a problem hiding this comment.
docstrings should be in the numpy doc format: https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt
|
|
||
| def draw_ortho_line_to_bank(ct_pt_geom, bank_geom, ortho_bearing, step, buffer_dist, max_dist): | ||
| """ | ||
| Search for intersects between the orthogonal lines and the river banks until max_dist is reached. |
There was a problem hiding this comment.
docstrings should be in the numpy doc format: https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt
| return ortho_ln_set | ||
|
|
||
| def create_ortho_grid(ct_ln_geom, bank_geom, step, grid_dist, buffer_dist, max_dist): | ||
| """ |
There was a problem hiding this comment.
this is close to the numpydoc format but not quite there. see the other functions for examples.
No description provided.