From 75ab151bba6248f324d8568ba281739766f4bb20 Mon Sep 17 00:00:00 2001 From: cyschneck <22159116+cyschneck@users.noreply.github.com> Date: Wed, 24 May 2023 15:11:49 -0600 Subject: [PATCH] v0.2.2, spelling corrections --- README.md | 10 +++++----- centerline_width/centerline.py | 4 ++-- setup.py | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index e03b041..e144778 100644 --- a/README.md +++ b/README.md @@ -186,7 +186,7 @@ river_object = centerline_width.riverCenterline(csv_data="data/river_coords.csv" ``` ### Return Latitude/Longitude Coordinates of Centerline -Return the latitude/longtiude coordinates of the centerline based on the left and right banks +Return the latitude/longitude coordinates of the centerline based on the left and right banks ``` river_object.centerlineLatitudeLongtiude ``` @@ -388,13 +388,13 @@ With limited data, the polygon will overlap more dramatically and will struggle ![example+png](https://raw.githubusercontent.com/cyschneck/river-geometry/main/data/doc_examples/invalid_example4.png) ### Invalid Centerline -If the data is too small, a centerline and its coordinates cannot not be found (since only a single Voronoi vertex exists within the polygon and after deadends are filtered) +If the data is too small, a centerline and its coordinates cannot not be found (since only a single Voronoi vertex exists within the polygon and after dead ends are filtered) -`CRITICAL ERROR, Voronoi diagram generated too small to find centerline (no starting node found), unable to plot centerline. Set displayVoronoi=True to view. Can typically be fixed by adding more data to expand range.` +`CRITICAL ERROR, Polygon too short for the Voronoi diagram generated (no starting node found), unable to plot centerline. Set displayVoronoi=True to view vertices. Can typically be fixed by adding more data to expand range.` ![example+png](https://raw.githubusercontent.com/cyschneck/river-geometry/main/data/doc_examples/invalid_example2.png) Can be fixed by expanding the data until the polygon is large enough to contain at least two different vertex points -### Invalid Top and Bottom Bank Postiions (flipBankDirection = True) +### Invalid Top and Bottom Bank Postions (flipBankDirection = True) Error: `Invalid Polygon Due to Flipped Banks, fix recommendation: rerun convertColumnsToCSV() and set flipBankDirection=True (or reset to default 'False' if currently set to flipBankDirection=True)` If the data for the left and right river banks are generated in reverse order, they will be read in the incorrect order and the graph will find the invalid top and bottom of the bank @@ -435,7 +435,7 @@ Based on work written in R (Golly et al. 2017):

-This material is based upon work supported by the National Science Foundation Graduate Fellowship under Grant No. 2141064. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the atuhors and do not neccessarily reflect the views of the National Science Foundation. +This material is based upon work supported by the National Science Foundation Graduate Fellowship under Grant No. 2141064. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation. ## Bug and Feature Request diff --git a/centerline_width/centerline.py b/centerline_width/centerline.py index 443e6c0..31d52e1 100644 --- a/centerline_width/centerline.py +++ b/centerline_width/centerline.py @@ -97,7 +97,7 @@ def centerlinePath(river_voronoi, river_polygon, top_polygon_line, bottom_polygo y_ridge_point.append((start_point[1], end_point[1])) if starting_node is None: - logger.critical("\nCRITICAL ERROR, Voronoi diagram generated too small to find centerline (no starting node found), unable to plot centerline. Set displayVoronoi=True to view. Can typically be fixed by adding more data to expand range.") + logger.critical("\nCRITICAL ERROR, Polygon too short for the Voronoi diagram generated (no starting node found), unable to plot centerline. Set displayVoronoi=True to view vertices. Can typically be fixed by adding more data to expand range.") shortest_path_points = None else: shortest_path_points = networkXGraphShortestPath(nx_graphs, starting_node, ending_node) @@ -260,7 +260,7 @@ def intersectsTopOrBottomOfBank(point1, point2): # Remove Intersection Lines centerline_coordinates_to_be_removed = [] if remove_intersections: - logger.info("[PROCSESING] Recursively removing interesection lines...") + logger.info("[PROCESSING] Recursively removing intersection lines...") # iterate from the most intersections to the least intersections for linestring_most_interactions in sorted(linestring_with_linestrings_that_intersect, key=lambda k: len(linestring_with_linestrings_that_intersect[k]), reverse=True): diff --git a/setup.py b/setup.py index edfc5a7..a556314 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ # Python Package Setup from setuptools import setup, find_namespace_packages -VERSION="0.2.1" +VERSION="0.2.2" DESCRIPTION="A Python package to find the centerline and width of rivers based on the latitude and longitude of the right and left bank" with open("README.md", "r") as f: