| 
									
										
										
										
											2022-07-14 15:17:09 +02:00
										 |  |  | /** | 
					
						
							|  |  |  |  * Class containing all constants and tables used in the script | 
					
						
							|  |  |  |  *  | 
					
						
							|  |  |  |  * @class Constants | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | export default class Constants { | 
					
						
							|  |  |  |   /** | 
					
						
							|  |  |  |    * Table used to determine tags for the category | 
					
						
							|  |  |  |    * | 
					
						
							|  |  |  |    * Keys are the original category names, | 
					
						
							|  |  |  |    * values are an object containing the tags | 
					
						
							|  |  |  |    */ | 
					
						
							|  |  |  |   public static categories = { | 
					
						
							|  |  |  |     restaurant: { | 
					
						
							|  |  |  |       amenity: "restaurant", | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |     parking: { | 
					
						
							|  |  |  |       amenity: "parking", | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |     hotel: { | 
					
						
							| 
									
										
										
										
											2022-07-18 16:10:06 +02:00
										 |  |  |       tourism: "hotel", | 
					
						
							| 
									
										
										
										
											2022-07-14 15:17:09 +02:00
										 |  |  |     }, | 
					
						
							|  |  |  |     wc: { | 
					
						
							|  |  |  |       amenity: "toilets", | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |     winkel: { | 
					
						
							|  |  |  |       shop: "yes", | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |     apotheek: { | 
					
						
							|  |  |  |       amenity: "pharmacy", | 
					
						
							|  |  |  |       healthcare: "pharmacy", | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |     ziekenhuis: { | 
					
						
							|  |  |  |       amenity: "hospital", | 
					
						
							|  |  |  |       healthcare: "hospital", | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |     bezienswaardigheid: { | 
					
						
							|  |  |  |       tourism: "attraction", | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |     ontspanning: { | 
					
						
							|  |  |  |       fixme: "Needs proper tags", | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |     cafe: { | 
					
						
							|  |  |  |       amenity: "cafe", | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |     dienst: { | 
					
						
							|  |  |  |       fixme: "Needs proper tags", | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |     bank: { | 
					
						
							|  |  |  |       amenity: "bank", | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |     gas: { | 
					
						
							|  |  |  |       amenity: "fuel", | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |     medical: { | 
					
						
							|  |  |  |       fixme: "Needs proper tags", | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |     obstacle: { | 
					
						
							|  |  |  |       fixme: "Needs proper tags", | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   /** | 
					
						
							|  |  |  |    * Table used to rename original Onwheels properties to their corresponding OSM properties | 
					
						
							|  |  |  |    * | 
					
						
							|  |  |  |    * Keys are the original Onwheels properties, values are the corresponding OSM properties | 
					
						
							|  |  |  |    */ | 
					
						
							|  |  |  |   public static names = { | 
					
						
							|  |  |  |     ID: "id", | 
					
						
							|  |  |  |     Naam: "name", | 
					
						
							|  |  |  |     Straat: "addr:street", | 
					
						
							|  |  |  |     Nummer: "addr:housenumber", | 
					
						
							|  |  |  |     Postcode: "addr:postcode", | 
					
						
							|  |  |  |     Plaats: "addr:city", | 
					
						
							|  |  |  |     Website: "website", | 
					
						
							|  |  |  |     Email: "email", | 
					
						
							|  |  |  |     "Aantal aangepaste parkeerplaatsen": "capacity:disabled", | 
					
						
							|  |  |  |     "Aantal treden": "step_count", | 
					
						
							|  |  |  |     "Hellend vlak aanwezig": "ramp", | 
					
						
							|  |  |  |     "Baby verzorging aanwezig": "changing_table", | 
					
						
							| 
									
										
										
										
											2022-07-19 20:54:05 +02:00
										 |  |  |     "Totale hoogte van de treden": "kerb:height", | 
					
						
							|  |  |  |     "Deurbreedte": "door:width", | 
					
						
							| 
									
										
										
										
											2022-07-14 15:17:09 +02:00
										 |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   /** | 
					
						
							|  |  |  |    * In some cases types might need to be converted as well | 
					
						
							|  |  |  |    * | 
					
						
							|  |  |  |    * Keys are the OSM properties, values are the wanted type | 
					
						
							|  |  |  |    */ | 
					
						
							|  |  |  |   public static types = { | 
					
						
							|  |  |  |     "Hellend vlak aanwezig": "boolean", | 
					
						
							|  |  |  |     "Baby verzorging aanwezig": "boolean", | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   /** | 
					
						
							|  |  |  |    * Some tags also need to have units added | 
					
						
							|  |  |  |    */ | 
					
						
							|  |  |  |   public static units = { | 
					
						
							|  |  |  |     "Totale hoogte van de treden": "cm", | 
					
						
							| 
									
										
										
										
											2022-07-19 20:54:05 +02:00
										 |  |  |     "Deurbreedte": "cm", | 
					
						
							| 
									
										
										
										
											2022-07-14 15:17:09 +02:00
										 |  |  |   }; | 
					
						
							|  |  |  | } |