Skip to content

Instantly share code, notes, and snippets.

@jkoan
Created January 2, 2021 15:16
Show Gist options
  • Save jkoan/474eeea01b5d14331b036eb6ca4dffbf to your computer and use it in GitHub Desktop.
Save jkoan/474eeea01b5d14331b036eb6ca4dffbf to your computer and use it in GitHub Desktop.
This rulefile helps maptool to produce a navit-binfile which only has about 1/3 of the normal file size.
#!/bin/bash
maptool -P -i $1 --rule-file=$PWD/maptool_rules_simplified --ignore-unknown $2
? addr:housenumber=* house_number
? aeroway=aerodrome poi_airport
? aeroway=airport poi_airport
? aeroway=helipad poi_heliport
? aeroway=terminal poi_airport
? amenity=atm poi_atm
? amenity=bank poi_bank
? amenity=bar poi_bar
n amenity=bench poi_bench
? amenity=bicycle_rental poi_bicycle_rental
? amenity=bicycle_parking poi_bicycle_parking
? amenity=biergarten poi_biergarten
? amenity=bus_station poi_bus_station
? amenity=cafe poi_cafe
? amenity=car_sharing poi_car_sharing
? amenity=car_wash poi_car_wash
? amenity=cinema poi_cinema
? amenity=college poi_school_college
? amenity=courthouse poi_justice
? amenity=drinking_water poi_potable_water
? amenity=fast_food poi_fastfood
? amenity=fire_station poi_firebrigade
? amenity=fountain poi_fountain
? amenity=fuel poi_fuel
? amenity=grave_yard poi_cemetery
? amenity=hospital poi_hospital
? amenity=hunting_stand poi_hunting_stand
? amenity=kindergarten poi_kindergarten
? amenity=library poi_library
? amenity=nightclub poi_nightclub
? amenity=park_bench poi_bench
? amenity=parking poi_car_parking
? amenity=pharmacy poi_pharmacy
? amenity=place_of_worship,religion=christian poi_church
? amenity=place_of_worship poi_worship
? amenity=police poi_police
? amenity=post_box poi_post_box
? amenity=post_office poi_post_office
? amenity=prison poi_prison
? amenity=pub poi_pub
? amenity=public_building poi_public_office
? amenity=recycling poi_recycling
? amenity=restaurant,cuisine=fine_dining poi_dining
? amenity=restaurant poi_restaurant
? amenity=school poi_school
? amenity=shelter poi_shelter
? amenity=taxi poi_taxi
? amenity=tec_common tec_common
? amenity=telephone poi_telephone
? amenity=theatre poi_theater
? amenity=toilets poi_restroom
? amenity=townhall poi_townhall
? amenity=university poi_school_university
? amenity=vending_machine poi_vending_machine
n barrier=bollard barrier_bollard
n barrier=cycle_barrier barrier_cycle
n barrier=lift_gate barrier_lift_gate
? car=car_rental poi_car_rent
? highway=bus_station poi_bus_station
? highway=bus_stop poi_bus_stop
n highway=mini_roundabout mini_roundabout
n highway=motorway_junction highway_exit
n highway=stop traffic_sign_stop
n highway=toll_booth poi_toll_booth
n highway=traffic_signals traffic_signals
n highway=turning_circle turning_circle
? historic=boundary_stone poi_boundary_stone
? historic=castle poi_castle
? historic=memorial poi_memorial
? historic=monument poi_monument
? historic=ruins poi_ruins
n historic=archaeological_site poi_archaeological_site
? landuse=cemetery poi_cemetery
? leisure=fishing poi_fish
? leisure=golf_course poi_golf
? leisure=marina poi_marine
? leisure=playground poi_playground
? leisure=slipway poi_boat_ramp
? leisure=sports_centre poi_sport
? leisure=stadium poi_stadium
? man_made=tower poi_tower
? military=airfield poi_military
? military=barracks poi_military
? military=bunker poi_military
? military=danger_area poi_danger_area
? military=range poi_military
? natural=bay poi_bay
? natural=peak,ele=* poi_peak
? natural=tree poi_tree
n place=city town_label_2e5
n place=hamlet town_label_2e2
n place=locality town_label_2e0
n place=suburb district_label
n place=town town_label_2e4
n place=village town_label_2e3
n power=tower power_tower
n power=sub_station power_substation
n railway=halt poi_rail_halt
n railway=level_crossing poi_level_crossing
? railway=station poi_rail_station
? railway=tram_stop poi_rail_tram_stop
? shop=baker poi_shop_baker
? shop=bakery poi_shop_baker
? shop=beverages poi_shop_beverages
? shop=bicycle poi_shop_bicycle
? shop=butcher poi_shop_butcher
? shop=car poi_car_dealer_parts
? shop=car_repair poi_repair_service
? shop=clothes poi_shop_apparel
? shop=convenience poi_shop_grocery
? shop=chemist poi_shop_drugstore
? shop=florist poi_shop_florist
? shop=fruit poi_shop_fruit
? shop=furniture poi_shop_furniture
? shop=garden_centre poi_shop_handg
? shop=hardware poi_shop_handg
? shop=hairdresser poi_hairdresser
? shop=kiosk poi_shop_kiosk
? shop=optician poi_shop_optician
? shop=parfum poi_shop_parfum
? shop=photo poi_shop_photo
? shop=shoes poi_shop_shoes
? shop=supermarket poi_shopping
? shop=mall poi_mall
? sport=10pin poi_bowling
? sport=baseball poi_baseball
? sport=basketball poi_basketball
? sport=climbing poi_climbing
? sport=golf poi_golf
? sport=motor_sports poi_motor_sport
? sport=skiing poi_skiing
? sport=soccer poi_soccer
? sport=stadium poi_stadium
? sport=swimming poi_swimming
? sport=tennis poi_tennis
? tourism=attraction poi_attraction
? tourism=camp_site poi_camp_rv
? tourism=caravan_site poi_camp_rv
? tourism=guest_house poi_guesthouse
? tourism=hostel poi_hostel
? tourism=hotel poi_hotel
? tourism=information poi_information
? tourism=motel poi_motel
? tourism=museum poi_museum_history
? tourism=picnic_site poi_picnic
? tourism=theme_park poi_resort
? tourism=viewpoint poi_viewpoint
? tourism=zoo poi_zoo
n natural=cave_entrance poi_cave
n traffic_sign=city_limit traffic_sign_city_limit
n highway=speed_camera tec_common
w addr:interpolation=even house_number_interpolation_even
w addr:interpolation=odd house_number_interpolation_odd
w addr:interpolation=all house_number_interpolation_all
w addr:interpolation=alphabetic house_number_interpolation_alphabetic
w aerialway=cable_car lift_cable_car
w aerialway=chair_lift lift_chair
w aerialway=drag_lift lift_drag
w aeroway=runway aeroway_runway
w aeroway=taxiway aeroway_taxiway
w boundary=administrative,admin_level=2 border_country
w boundary=civil border_civil
w boundary=national_park border_national_park
w boundary=political border_political
w contour_ext=elevation_major height_line_1
w contour_ext=elevation_medium height_line_2
w contour_ext=elevation_minor height_line_3
w highway=bridleway bridleway
w highway=bus_guideway bus_guideway
w highway=construction street_construction
w highway=cyclepath cycleway
w highway=cycleway cycleway
w highway=footway footway
w highway=footway,piste:type=nordic footway_and_piste_nordic
w highway=living_street living_street
w highway=minor street_1_land
w highway=parking_lane street_parking_lane
w highway=path path
w highway=path,bicycle=designated cycleway
w highway=path,bicycle=official cycleway
w highway=path,bicycle=designated,foot=designated cycleway
w highway=path,bicycle=official,foot=official cycleway
w highway=path,foot=designated footway
w highway=path,foot=official footway
w highway=path,horse=designated bridleway
w highway=path,horse=official bridleway
w highway=path,sac_scale=alpine_hiking hiking_alpine
w highway=path,sac_scale=demanding_alpine_hiking hiking_alpine_demanding
w highway=path,sac_scale=demanding_mountain_hiking hiking_mountain_demanding
w highway=path,sac_scale=difficult_alpine_hiking hiking_alpine_difficult
w highway=path,sac_scale=hiking hiking
w highway=path,sac_scale=mountain_hiking hiking_mountain
w highway=pedestrian street_pedestrian
w highway=motorway highway_land
w highway=motorway,rural=0 highway_city
w highway=motorway_link ramp
w highway=trunk street_n_lanes
w highway=trunk_link ramp
w highway=primary street_4_land
w highway=primary,name=*,rural=1 street_4_land
w highway=primary,name=* street_4_city
w highway=primary,rural=0 street_4_city
w highway=primary_link ramp
w highway=secondary street_3_land
w highway=secondary,name=*,rural=1 street_3_land
w highway=secondary,name=* street_3_city
w highway=secondary,rural=0 street_3_city
w highway=secondary_link ramp
w highway=tertiary street_2_land
w highway=tertiary,name=*,rural=1 street_2_land
w highway=tertiary,name=* street_2_city
w highway=tertiary,rural=0 street_2_city
w highway=tertiary_link ramp
w highway=residential street_1_city
w highway=unclassified street_1_city
w highway=road street_1_city
w highway=service street_service
w highway=service,service=parking_aisle street_parking_lane
w highway=track track_gravelled
w highway=track,surface=grass track_grass
w highway=track,surface=gravel track_gravelled
w highway=track,surface=ground track_ground
w highway=track,surface=paved track_paved
w highway=track,surface=unpaved track_unpaved
w highway=track,tracktype=grade1 track_paved
w highway=track,tracktype=grade2 track_gravelled
w highway=track,tracktype=grade3 track_unpaved
w highway=track,tracktype=grade4 track_ground
w highway=track,tracktype=grade5 track_grass
w highway=track,surface=paved,tracktype=grade1 track_paved
w highway=track,surface=gravel,tracktype=grade2 track_gravelled
w highway=track,surface=unpaved,tracktype=grade3 track_unpaved
w highway=track,surface=ground,tracktype=grade4 track_ground
w highway=track,surface=grass,tracktype=grade5 track_grass
w highway=unsurfaced track_gravelled
w highway=steps steps
w waterway=canal water_canal
w waterway=drain water_drain
w waterway=river water_river
w waterway=stream water_stream
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment