https://OpenBenches.org/ - an open data repository for memorial benches.
You can sponsor OpenBenches on GitHub.
We'd like to thank the following sponsors for their generosity:
All contributions are welcome. Before making a pull request, please:
- Raise a new issue describing the problem and how you intend to fix it.
- Submit a Pull Request referencing the Issue.
You can get all the data, or partial data, from the API. Data is returned in geoJSON format and has the following structure:
{
"type": "FeatureCollection",
"features": [{
"id": 1234657,
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [0.1234, 5.678]
},
"properties": {
"created_at": "2021-06-05T12:27:36+01:00",
"popupContent": "IN LOVING MEMORY OF\nBOB AND\nJANE",
"media": [{
"URL": "\/image\/3f786850e387550fdab836ed7e6dc881de23001b",
"mediaID": 123456789,
"licence": "CC BY-SA 4.0",
"media_type": "inscription",
"sha1": "3f786850e387550fdab836ed7e6dc881de23001b",
"user": 6143,
"username": "edent",
"userprovider": "twitter",
"width": 4096,
"height": 3072
}, {
"URL": "\/image\/89e6c98d92887913cadf06b2adb97f26cde4849b",
"mediaID": 43803,
"licence": "CC BY-SA 4.0",
"media_type": "bench",
"sha1": "89e6c98d92887913cadf06b2adb97f26cde4849b",
"user": 123456780,
"username": "edent",
"userprovider": "twitter",
"width": 4096,
"height": 3072
}]
}
}]
}- All Bench Data (GeoJSON)
https://openbenches.org/api/benches- Cached for 10 minutes - changes may not appear immediately
- Specific Bench (GeoJSON)
https://openbenches.org/api/bench/123
- Benches from a specific user
https://openbenches.org/api/user/5678
- Search Results (GeoJSON)
https://openbenches.org/api/search?search=in%20loving%20memory
- Tagged Benches (GeoJSON)
https://openbenches.org/api/tag/dog
- Benches near a location (GeoJSON)
https://openbenches.org/api/nearest/?latitude=46.67583&longitude=8.245239&distance=200- Distance is in Km
- Uses the Haversine formula
- Benches near a location (GPX)
https://openbenches.org/api/nearest/gpx?latitude=46.67583&longitude=8.245239&distance=200
- Specify number of benches
- By default, a maximum of 20 results are returned.
- To change the number of results, use
&limit=, for example&limit=50for up to 50 benches.
- By default, the inscriptions are truncated to 128 characters.
- To get the full inscriptions, append
&truncated=false https://openbenches.org/api/benches?truncated=false
- By default, the API doesn't return media.
- To get media, append
https://openbenches.org/api/benches?media=true
- By default, the API returns all results
- To get the latest 5 benches, append
&latest=5 https://openbenches.org/api/benches?latest=5
- All available folksonomy tags
https://openbenches.org/api/tags
This is a Symfony PHP and MySQL website. No need for node, complicated deploys, or spinning up containerised virtual machines in the cloud.
- PHP 8 or greater.
- MySQL 5.5 or greater with innodb.
- ImageMagick 6.9.4-10 or greater.
For more, see CONTRIBUTING.md
In the /database/ folder you'll find a sample database. All text fields are utf8mb4_unicode_ci because we live in the future now.
Hopefully, the tables are self explanatory:
benchIDlatitudelongitudeaddresstext representation generated by reverse geocoding. For example "10 Downing Street, London SW1A 2AA, United Kingdom"inscriptionthe text written on the benchdescriptionplaceholder. Might be used for comments about the bench.presentif a bench has been physically removed, this can be set to false.publishedset to FALSE if the bench has been deletedaddeddatetime of when the bench was uploaded to the siteuserIDforeign keyosmIDthe node ID from OpenStreetMap
Originally we were going to force people to sign in with Twitter / Facebook / GitHub. But that discourages use - so users are now pseudo-anonymous. Hence this weird structure!
userIDprovidercould be Twitter, GitHub, Facebook, anon etc.providerIDuser ID number on the provider's service. Anonymous users stores their IP address.nametheir display name. Anonymous users stores the time they added a bench.
We store the original image - smaller images are rendered dynamically.
Media storage can be complicated. Storing thousands of images in a single directory can cause problems on some systems. To get around this, we calculate the SHA1 hash of each image. The image is stored in a subdirectory based on the hash. For example, if the hash is 1A2B3C, the file will be stored in /photos/1/A/1A2B3C.jpg
mediaIDbenchIDuserIDsha1A hash of the file.importURLIf the image was imported from an external source - like Flickr.licenceThe default isCC BY-SA 4.0, imported images may be different.media_typeWe allow different types of photo - in the future, we might have other types of media.widthThe image's width in pixels.heightThe image's width in pixels.datetimeThe date and time the image was created - based on EXIF metadata.makeThe make of camera which took the photo - based on EXIF metadata.modelThe model of camera which took the photo - based on EXIF metadata.
At the moment, we only accept photos - of the inscription, the bench, the view from the bench, a panorama, and a VR photosphere.
shortNameInternal ID.longNameDisplayed to the user.displayOrderWhen rendering a form in HTML, this determines the order they are presented in.
shortNameInternal ID.longNameDisplayed to the user.urlFor more information.
Benches can be given multiple "tags". For example "cat" if the bench commemorates a feline, or "beach" if the bench is at the seaside.
Tagging uses the Toxi structure.
-
tagscontains:tagIDa unique IDtagTextthe displayed text
-
tag_mapcontains:mapIDa unique IDtagIDthe ID of a tagbenchIDthe ID of a bench
Tags are hard-coded in the database and can't be added or edited by regular users.
Everything we do builds on someone else's hard work.
- OpenBenches data are made available under the Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0).
- The code powering the website is MIT.
- All photos uploaded by users are CC BY-SA 4.0.
- Benches from Bath are OGL and Powered by Bath: Hacked.
- Logo template by Creative Mania CC BY.
- Panoramic Visualiser by Pannellum MIT.
- JavaScript EXIF reader & image preview by JavaScript Load Image (MIT).
- Login services provided by Auth0.com's PHP library MIT.
- CSS based on PicniCSS MIT (chosen mostly because we like picnic benches!)
- Animated OCR icon by Loading.io CC BY.
- Comments by Commentics GPL v3
- Starfield Image by uncertaintysheep CC BY-SA 2.0
- osmID is from OpenStreetMap whose data is under the ODbL
- See https://openbenches.org/colophon for more
And thanks to the many contributors who have improved this codebase.