Commit 6066a9e7 by Cecilia Nievas

### Changed position of empty line at the end of doctrings

parent 4a372f67
 ... ... @@ -58,8 +58,8 @@ def define_corners(centr_lon, centr_lat, width_EW, width_NS): lat_s (float): Latitude of the south border of the cell, in degrees. lon_e (float): Longitude of the east border of the cell, in degrees. lat_n (float): Latitude of the north border of the cell, in degrees. """ if (width_EW <= 0.0) or (width_NS <= 0.0): print("ERROR in define_corners: width_EW and width_NS need to be positive numbers >=0") return 999.9, 999.9, 999.9, 999.9 ... ... @@ -83,8 +83,8 @@ def define_cell_polygon(lon_w, lat_s, lon_e, lat_n): Returns: Shapely polygon defined by the four coordinates given as input (rectangle). """ return Polygon([(lon_w, lat_s), (lon_e, lat_s), (lon_e, lat_n), (lon_w, lat_n)]) ... ... @@ -110,8 +110,8 @@ def define_cells_in_dataframe(in_df, col_lon, col_lat, width_EW, width_NS, in_cr out_gdf: A GeoPandas DataFrame containing the same columns as in_df, plus the geometry of cells defined around the centroids. Number of rows equal to the number of rows in in_df. """ # Return the input in_df if width_EW or width_NS are not valid: if (width_EW <= 0.0) or (width_NS <= 0.0): print("ERROR in define_corners: with_EW and width_NS need to be positive numbers >=0") ... ... @@ -177,8 +177,8 @@ def retrieve_unique_points(in_df, col_lon, col_lat, id_str, precision=4, in_crs= CRS: as per in_crs. ids_of_unique (array of str): IDs of the unique points (those of out_gpd["id"]) associated with each row of in_df. """ # Concatenate longitude and latitude as strings to identify unique points with a precision: pr_str = "{:.%sf}" % (precision) all_pts_str = np.array( ... ... @@ -245,8 +245,8 @@ def create_dict_all_coordinates(in_gdf, rounding_precision): floats ("all_float") and in the other in terms of strings, with number of decimal places as indicated by rounding_precision ("all_str"). """ # Check that in_gdf has the needed columns and terminate otherwise: if ( ("lon_w" not in in_gdf.columns) ... ... @@ -294,8 +294,8 @@ def create_dict_unique_coordinates(coords_dict): coords_uq is "lon" and "lat_s" and "lat_n" into "lat" when the key in coords_uq is "lat". The two arrays may have different lengths. """ # Check that coords_dict has the needed keys and terminate otherwise: if ( ("lon_w" not in coords_dict.keys()) ... ... @@ -352,8 +352,8 @@ def adjust_coords(coords_dict, coords_uq): arrays in coords_dict). Their elements correspond to one another. They are the adjusted version of coords_dict[key]["all_float"]. """ # Check that coords_dict has the needed keys and terminate otherwise: if ( ("lon_w" not in coords_dict.keys()) ... ...
 ... ... @@ -42,8 +42,8 @@ def test_define_corners(): Tolerance used for difference in results (subtraction) = 1e-08 (the number of decimal places used in the test dataset). """ # Read test data: pathname = os.path.join( os.path.dirname(__file__), "data", "GDE_TOOLS_create_industrial_cells" ... ... @@ -92,8 +92,8 @@ def test_define_cells_in_dataframe(): This test uses the same datafile as the test for define_corners(), which was generated using a spreadsheet. """ # Read test data: pathname = os.path.join( os.path.dirname(__file__), "data", "GDE_TOOLS_create_industrial_cells" ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment