def zoom_threshold(zoom): return meter_to_mapunit(20037508.0 * 2 / (2**(8 + zoom)))
def zoom_threshold(zoom): return meter_to_mapunit(20037508.0 * 2 / (2**(8 + zoom)))
mapping={ 'amenity': ( 'university', 'school', 'library', 'fuel', 'hospital', 'fire_station', 'police', 'townhall', ), }) motorways_gen1 = GeneralizedTable( name='motorways_gen1', tolerance=meter_to_mapunit(50.0), origin=motorways, ) mainroads_gen1 = GeneralizedTable( name='mainroads_gen1', tolerance=meter_to_mapunit(50.0), origin=mainroads, ) railways_gen1 = GeneralizedTable( name='railways_gen1', tolerance=meter_to_mapunit(50.0), origin=railways, )
mapping = { 'amenity': ( 'university', 'school', 'library', 'fuel', 'hospital', 'fire_station', 'police', 'townhall', ), }) motorways_gen1 = GeneralizedTable( name = 'motorways_gen1', tolerance = meter_to_mapunit(50.0), origin = motorways, ) mainroads_gen1 = GeneralizedTable( name = 'mainroads_gen1', tolerance = meter_to_mapunit(50.0), origin = mainroads, ) railways_gen1 = GeneralizedTable( name = 'railways_gen1', tolerance = meter_to_mapunit(50.0), origin = railways, )
"theatre", "place_of_worship", "hospital", ), "place": ("island",), "tourism": ("zoo",), "aeroway": ("aerodrome", "helipad", "apron"), }, ) amenities = Points( name="amenities", mapping={"amenity": ("university", "school", "library", "fuel", "hospital", "fire_station", "police", "townhall")}, ) motorways_gen1 = GeneralizedTable(name="motorways_gen1", tolerance=meter_to_mapunit(50.0), origin=motorways) mainroads_gen1 = GeneralizedTable(name="mainroads_gen1", tolerance=meter_to_mapunit(50.0), origin=mainroads) railways_gen1 = GeneralizedTable(name="railways_gen1", tolerance=meter_to_mapunit(50.0), origin=railways) motorways_gen0 = GeneralizedTable(name="motorways_gen0", tolerance=meter_to_mapunit(200.0), origin=motorways_gen1) mainroads_gen0 = GeneralizedTable(name="mainroads_gen0", tolerance=meter_to_mapunit(200.0), origin=mainroads_gen1) railways_gen0 = GeneralizedTable(name="railways_gen0", tolerance=meter_to_mapunit(200.0), origin=railways_gen1) landusages_gen0 = GeneralizedTable( name="landusages_gen0", tolerance=meter_to_mapunit(200.0), origin=landusages,