Skip to content

Commit

Permalink
set_crs and set_geometry
Browse files Browse the repository at this point in the history
  • Loading branch information
gboeing committed Jun 27, 2023
1 parent 293b396 commit 36c4f74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions osmnx/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,8 +462,8 @@ def _create_gdf(response_jsons, polygon, tags):
gdf = gpd.GeoDataFrame.from_dict(geometries, orient="index")
if "geometry" not in gdf.columns:
# if there is no geometry column, create a null column
gdf.set_geometry([None] * len(gdf))
gdf.crs = settings.default_crs
gdf = gdf.set_geometry([None] * len(gdf))

Check warning on line 465 in osmnx/features.py

View check run for this annotation

Codecov / codecov/patch

osmnx/features.py#L465

Added line #L465 was not covered by tests
gdf = gdf.set_crs(settings.default_crs)

# Apply .buffer(0) to any invalid geometries
gdf = _buffer_invalid_geometries(gdf)
Expand Down

0 comments on commit 36c4f74

Please sign in to comment.