-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from JonasCinquini/dev
Dev - Nuew Functionalities Added.
- Loading branch information
Showing
12 changed files
with
65 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#!/bin/sh | ||
python generate_grid.py ./data/shapefiles/csk_frame_map_italy_epsg4326.shp --out_dir="/Users/enricociraci/Desktop/test" | ||
python generate_grid.py C:\Users\e.ciraci\Desktop\MapItaly\146.shp --out_dir="C:\Users\e.ciraci\Desktop\MapItaly\test" --plot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env python | ||
""" Unit tests for the rm_z_coord function. """ | ||
import geopandas as gpd | ||
from shapely.geometry import Polygon | ||
from rm_z_coord import rm_z_coord | ||
|
||
|
||
def test_rm_z_coord(): | ||
# Create a GeoDataFrame for testing | ||
data = {'geometry': [Polygon([(0, 0, 1), (1, 0, 2), | ||
(1, 1, 3), (0, 1, 4)])]} | ||
gdf = gpd.GeoDataFrame(data, crs='EPSG:4326') | ||
|
||
# Apply the function | ||
result_gdf = rm_z_coord(gdf.copy()) | ||
|
||
# Check if the z-coordinate is removed from the geometry | ||
assert all(result_gdf['geometry'].apply(lambda geom: | ||
len(geom.exterior.coords[0]) == 2)) |