Skip to content

Commit

Permalink
Do not clip geometry for Points, better performance
Browse files Browse the repository at this point in the history
  • Loading branch information
Phyks committed Aug 17, 2019
1 parent f1d5973 commit 4993a8e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions osm2opendata/mapping.py
Expand Up @@ -121,6 +121,11 @@ def _clip_geometry(geometry, searchArea):
:param geometry: A GeoJSON geometry.
:param searchArea: The area to clip geometry to.
"""
if geometry.get('type') == 'Point':
# No need to clip Points, they should lie within the expected area from
# Overpass query.
return geometry

osm_type, osm_id = nominatim.geocode_place(searchArea)
clipping_geometry = next(
x
Expand Down

0 comments on commit 4993a8e

Please sign in to comment.