Skip to content

Commit

Permalink
Remove unneed param
Browse files Browse the repository at this point in the history
  • Loading branch information
jtmiclat committed Jul 5, 2022
1 parent cc3b4ff commit 9a27cc8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
4 changes: 1 addition & 3 deletions geowrangler/grids.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,7 @@ def generate_grid(self: H3GridGenerator, gdf: GeoDataFrame) -> DataFrame:
df = DataFrame({"hex_id": list(hex_ids)})
if self.return_geometry is False:
return df
hexes = df.hex_id.apply(
lambda id: Polygon(h3.h3_to_geo_boundary(id, geo_json=True))
)
hexes = df.hex_id.apply(lambda id: Polygon(h3.h3_to_geo_boundary(id)))
h3_gdf = GeoDataFrame(
df,
geometry=hexes,
Expand Down
7 changes: 2 additions & 5 deletions notebooks/00_grids.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -277,16 +277,13 @@
" df = DataFrame({\"hex_id\": list(hex_ids)})\n",
" if self.return_geometry is False:\n",
" return df\n",
" hexes = df.hex_id.apply(\n",
" lambda id: Polygon(h3.h3_to_geo_boundary(id, geo_json=True))\n",
" )\n",
" hexes = df.hex_id.apply(lambda id: Polygon(h3.h3_to_geo_boundary(id)))\n",
" h3_gdf = GeoDataFrame(\n",
" df,\n",
" geometry=hexes,\n",
" crs=\"epsg:4326\",\n",
" )\n",
" h3_gdf.set_crs(gdf.crs)\n",
" return h3_gdf"
" return h3_gdf.to_crs(gdf.crs)"
]
},
{
Expand Down

0 comments on commit 9a27cc8

Please sign in to comment.