Skip to content

Commit

Permalink
Adjust geodataframes
Browse files Browse the repository at this point in the history
  • Loading branch information
GregoryPetrochenkov-NOAA committed Sep 20, 2023
1 parent c2bdea9 commit d1790c4
Showing 1 changed file with 16 additions and 22 deletions.
38 changes: 16 additions & 22 deletions tests/cases_subsampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@
),
]


subsampling_continuous_df = gpd.GeoDataFrame(
{
"geometry": {
0: Polygon(
subsampling_dataframes = [
gpd.GeoDataFrame(
geometry=[
Polygon(
[
(-97.72375, 29.56328),
(-97.72304, 29.55858),
Expand All @@ -44,7 +43,7 @@
(-97.72375, 29.56328),
]
),
1: Polygon(
Polygon(
[
(-97.71604, 29.55635),
(-97.71587, 29.55196),
Expand All @@ -54,15 +53,12 @@
(-97.71604, 29.55635),
]
),
}
}
)
subsampling_continuous_df.crs = "EPSG:4326"

subsampling_categorical_df = gpd.GeoDataFrame(
{
"geometry": {
0: Polygon(
],
crs="EPSG:4326",
),
gpd.GeoDataFrame(
geometry=[
Polygon(
[
(-97.56735, 30.07450),
(-97.51800, 29.96872),
Expand All @@ -72,7 +68,7 @@
(-97.56735, 30.07450),
]
),
1: Polygon(
Polygon(
[
(-97.21658, 30.07011),
(-97.20986, 29.95981),
Expand All @@ -81,13 +77,11 @@
(-97.21658, 30.07011),
]
),
}
}
)
subsampling_categorical_df.crs = "EPSG:4326"

],
crs="EPSG:4326",
),
]

subsampling_dataframes = [subsampling_continuous_df, subsampling_categorical_df]

create_dataframe_options = [
{"subsampling_type": ["include", "include"], "subsampling_weights": [1, 2]},
Expand Down

0 comments on commit d1790c4

Please sign in to comment.