Merge pull request #28 from chrieke/fix_crs

Fix crs instead of dummy request
This commit is contained in:
Marcelo de Oliveira Rosa Prates 2021-08-29 14:42:57 -03:00 committed by GitHub
commit 5572b742a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -132,8 +132,7 @@ def get_layer(layer, **kwargs):
return unary_union(ox.project_gdf(kwargs['perimeter']).geometry)
# If point and radius are provided:
elif 'point' in kwargs and 'radius' in kwargs:
# Dummy request to fetch CRS
crs = ox.graph_to_gdfs(ox.graph_from_point(kwargs['point'], dist = kwargs['radius']), nodes = False).crs
crs = "EPSG:4326"
perimeter = get_boundary(
kwargs['point'], kwargs['radius'], crs,
**{x: kwargs[x] for x in ['circle', 'dilate'] if x in kwargs.keys()}