INNER CODE UNIT · Python
is_point_geometry
Zverik/every_door · tools/json_to_sqlite.py:231
def is_point_geometry(row: dict) -> bool:
return ('geometry' in row and
('point' in row['geometry'] or 'vertex' in row['geometry']))
def skip_preset(name: str, row: dict) -> bool:
# Skip templates.
if name[0] == '@':
return True
# There are super-generic presets like "relation" with no tags.
if not row['tags']:
return True
# Override geometry check for buildings
if name.startswith('building'):
return False
# Note that we keep presets both for points and vertices (in a line).
if not is_point_geometry(row):
return True
return False