Skip to content

Commit 6f5c044

Browse files
committed
Add schema.org info
closes #39
1 parent 64b0355 commit 6f5c044

1 file changed

Lines changed: 215 additions & 0 deletions

File tree

schema-org-mappings.yaml

Lines changed: 215 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,215 @@
1+
# Schema.org Type Mappings for OpenPlaceGuide
2+
# Maps POI types and areas to appropriate schema.org types
3+
4+
# Place/Business Type Mappings
5+
place_types:
6+
# Financial Services
7+
banks: "https://schema.org/BankOrCreditUnion"
8+
insurances: "https://schema.org/InsuranceAgency"
9+
10+
# Food & Dining
11+
restaurants: "https://schema.org/Restaurant"
12+
cafes: "https://schema.org/CafeOrCoffeeShop"
13+
bars: "https://schema.org/BarOrPub"
14+
pubs: "https://schema.org/BarOrPub"
15+
fast-food: "https://schema.org/FastFoodRestaurant"
16+
17+
# Accommodation
18+
hotels: "https://schema.org/Hotel"
19+
motels: "https://schema.org/Motel"
20+
hostels: "https://schema.org/Hostel"
21+
guest-houses: "https://schema.org/BedAndBreakfast"
22+
23+
# Retail Shops
24+
supermarkets: "https://schema.org/GroceryStore"
25+
department-stores: "https://schema.org/DepartmentStore"
26+
book-shops: "https://schema.org/BookStore"
27+
shoe-shops: "https://schema.org/ShoeStore"
28+
buy-clothes: "https://schema.org/ClothingStore"
29+
buy-flowers: "https://schema.org/Florist"
30+
electronics: "https://schema.org/ElectronicsStore"
31+
furniture-shops: "https://schema.org/FurnitureStore"
32+
computer-shops: "https://schema.org/ComputerStore"
33+
car-shops: "https://schema.org/AutoDealer"
34+
hardware: "https://schema.org/HardwareStore"
35+
butchers: "https://schema.org/LocalBusiness"
36+
greengrocer: "https://schema.org/LocalBusiness"
37+
organic-shops: "https://schema.org/LocalBusiness"
38+
kiosks: "https://schema.org/LocalBusiness"
39+
stationaries: "https://schema.org/LocalBusiness"
40+
41+
# Healthcare
42+
hospitals: "https://schema.org/Hospital"
43+
doctors: "https://schema.org/MedicalClinic"
44+
dentists: "https://schema.org/Dentist"
45+
pharmacies: "https://schema.org/Pharmacy"
46+
opticians: "https://schema.org/LocalBusiness"
47+
verterinaries: "https://schema.org/VeterinaryCare"
48+
49+
# Education
50+
schools: "https://schema.org/School"
51+
kindergartens: "https://schema.org/Preschool"
52+
colleges: "https://schema.org/CollegeOrUniversity"
53+
universities: "https://schema.org/CollegeOrUniversity"
54+
libraries: "https://schema.org/Library"
55+
56+
# Entertainment & Culture
57+
cinemas: "https://schema.org/MovieTheater"
58+
theatres: "https://schema.org/PerformingArtsTheater"
59+
museums: "https://schema.org/Museum"
60+
nightclubs: "https://schema.org/NightClub"
61+
zoos: "https://schema.org/Zoo"
62+
art-centers: "https://schema.org/LocalBusiness"
63+
64+
# Sports & Recreation
65+
gyms: "https://schema.org/ExerciseGym"
66+
swimming-pools: "https://schema.org/SportsActivityLocation"
67+
stadiums: "https://schema.org/Stadium"
68+
golf-courses: "https://schema.org/GolfCourse"
69+
bowling: "https://schema.org/BowlingAlley"
70+
football-fields: "https://schema.org/SportsActivityLocation"
71+
tennis-courts: "https://schema.org/SportsActivityLocation"
72+
73+
# Automotive
74+
get-fuel: "https://schema.org/GasStation"
75+
car-repair: "https://schema.org/AutoRepair"
76+
rent-a-car: "https://schema.org/AutoRental"
77+
car-sharing: "https://schema.org/LocalBusiness"
78+
79+
# Transportation
80+
airports: "https://schema.org/Airport"
81+
bus-stations: "https://schema.org/BusStation"
82+
taxi: "https://schema.org/TaxiService"
83+
parking: "https://schema.org/ParkingFacility"
84+
85+
# Government & Public Services
86+
governmental-offices: "https://schema.org/GovernmentOffice"
87+
embassies: "https://schema.org/Embassy"
88+
post-offices: "https://schema.org/PostOffice"
89+
police-stations: "https://schema.org/PoliceStation"
90+
fire-stations: "https://schema.org/FireStation"
91+
courthouses: "https://schema.org/Courthouse"
92+
prisons: "https://schema.org/LocalBusiness"
93+
public-buildings: "https://schema.org/GovernmentBuilding"
94+
95+
# Religious & Community
96+
churches-mosques: "https://schema.org/PlaceOfWorship"
97+
community-center: "https://schema.org/CommunityCenter"
98+
grave-yards: "https://schema.org/Cemetery"
99+
100+
# Utilities & Services
101+
internet-cafes: "https://schema.org/LocalBusiness"
102+
laundries: "https://schema.org/LaundryService"
103+
dry-cleaners: "https://schema.org/DryCleaningOrLaundry"
104+
hairdressers: "https://schema.org/BeautySalon"
105+
post-boxes: "https://schema.org/LocalBusiness"
106+
public-toilets: "https://schema.org/PublicToilet"
107+
public-telephones: "https://schema.org/LocalBusiness"
108+
109+
# Housing & Real Estate
110+
apartments: "https://schema.org/Residence"
111+
houses: "https://schema.org/House"
112+
estate_agents: "https://schema.org/RealEstateAgent"
113+
114+
# Other Services
115+
studios: "https://schema.org/LocalBusiness"
116+
rent-a-video: "https://schema.org/LocalBusiness"
117+
ngos: "https://schema.org/NGO"
118+
businesses: "https://schema.org/LocalBusiness"
119+
120+
# Default fallback for unknown types
121+
~fallback_type: "https://schema.org/LocalBusiness"
122+
123+
# Area Type Mappings
124+
area_types:
125+
# Administrative divisions
126+
cities: "https://schema.org/City"
127+
cities2: "https://schema.org/City"
128+
subcities: "https://schema.org/AdministrativeArea"
129+
areas: "https://schema.org/AdministrativeArea"
130+
131+
# Infrastructure & Places
132+
buildings: "https://schema.org/Place"
133+
gardens: "https://schema.org/Park"
134+
135+
# Street types (may be used for area categorization)
136+
main-streets: "https://schema.org/Place"
137+
secondary-streets: "https://schema.org/Place"
138+
tertiary-streets: "https://schema.org/Place"
139+
residential-roads: "https://schema.org/Place"
140+
141+
# Industrial areas
142+
industrial: "https://schema.org/Place"
143+
industrials: "https://schema.org/Place"
144+
145+
# Schema.org Property Mappings
146+
# Maps available data fields to schema.org properties
147+
property_mappings:
148+
place:
149+
# Basic identification
150+
name: "name"
151+
logo: "logo"
152+
gallery: "image"
153+
color: "brand/color" # Custom property for branding
154+
155+
# Geographic data
156+
lat: "geo/latitude"
157+
lon: "geo/longitude"
158+
159+
# OSM integration
160+
osm_id: "additionalProperty"
161+
osm_type: "additionalProperty"
162+
163+
# Tags and classification
164+
tags: "additionalProperty"
165+
166+
area:
167+
# Basic identification
168+
name: "name"
169+
description: "description"
170+
171+
# Geographic data
172+
boundingBox: "geo"
173+
174+
# Hierarchical relationships
175+
sub_areas: "containsPlace"
176+
177+
# OSM integration
178+
osm_id: "additionalProperty"
179+
osm_type: "additionalProperty"
180+
181+
# Language support for multilingual properties
182+
languages:
183+
supported: ["en", "am", "de"]
184+
default: "en"
185+
property_suffix: true # Whether to add language suffix to properties (e.g., "name@en")
186+
187+
# Special mappings for specific schema.org requirements
188+
special_mappings:
189+
# Opening hours (if available in tags)
190+
opening_hours: "openingHours"
191+
192+
# Contact information (if available in tags)
193+
phone: "telephone"
194+
website: "url"
195+
email: "email"
196+
197+
# Address information (derived from OSM data)
198+
address: "address"
199+
200+
# Social media (if available)
201+
facebook: "sameAs"
202+
twitter: "sameAs"
203+
instagram: "sameAs"
204+
205+
# Validation rules
206+
validation:
207+
required_properties:
208+
place: ["name", "geo"]
209+
area: ["name"]
210+
211+
# Properties that should be URLs
212+
url_properties: ["logo", "image", "url", "sameAs"]
213+
214+
# Properties that should be multilingual
215+
multilingual_properties: ["name", "description"]

0 commit comments

Comments
 (0)