Reverse Geocoding¶
If enabled, our privacy-preserving reverse geocoding service provides global location information to enrich your photo and video metadata with details such as country, state, city, and category:
- API requests are not logged permanently.
- Location data is cached so that it can be reused for subsequent requests from you or other users.
- Our API approximates the coordinates and encodes them with a fuzzy S2 cell ID that does not include the house number or any other data identifying a specific residential address, except possibly in very sparsely populated areas of the world. Even then, we cannot trace the request back to a person, picture or point in time.
- We may store your server's IP address and other HTTP request headers for a limited time to perform authorization checks, prevent abuse, and implement rate limits. Since the traffic is encrypted, no one intercepting the server-to-server communication can see the exact request and response; only the fact that you exchanged data with our backend.
To show where you've been, the user interface includes four high-resolution interactive world maps. For details, see rendering maps.
Example Request¶
GET https://places.photoprism.app/v1/location/149ce78563
{
"id": "s2:149ce78563",
"name": "Elafonisi Kite Club",
"street": "Κεφαλή",
"postcode": "",
"category": "nature",
"timezone": "Europe/Athens",
"lat": 35.269638,
"lng": 23.536951,
"place": {
"id": "gr:GCd9oey68OFr",
"label": "Χρυσοσκαλίτισσα, Greece",
"district": "",
"city": "Χρυσοσκαλίτισσα",
"state": "Αποκεντρωμένη Διοίκηση Κρήτης",
"country": "gr",
"keywords": "χρυσοσκαλίτσα"
},
"events": [],
"licence": "Data © PhotoPrism"
}
Related Resources¶
Event Discovery¶
- https://schedjoules.github.io/event-discovery-api/#introduction
- https://www.gdeltproject.org/data.html#rawdatafiles
Libraries¶
- https://tegola.io/ - An open source vector tile server written in Go
- https://tegola.io/tutorials/tegola-with-open-layers/ - Using Tegola with OpenLayers
- https://github.com/go-spatial/tegola-osm - scripts for importing and running a mirror of OSM with tegola
- https://pelias.io/ - Pelias Geocoder (GitHub)
- https://github.com/Leaflet/Leaflet - JavaScript library for mobile-friendly interactive maps
- https://github.com/tidwall/tile38 - a geospatial database and realtime geofencing server
- https://github.com/melihmucuk/geocache - an in-memory cache that is suitable for geolocation based applications
- https://github.com/aaronland/go-slippy-tiles - a proxy for map tiles
- https://github.com/paulmach/osm - a general purpose library for reading, writing and working with OpenStreetMap data
- https://github.com/maguro/pbf - a Go-based OpenStreetMap PBF encoder/ decoder
- https://github.com/golang/geo - S2 geometry library in Go
- https://gist.github.com/antoniomo/3371e44cbe2f0cc75a525aac0d188cfb - example for S2 geometry library
- https://github.com/tidwall/redcon - Redis compatible server framework (Go)
- https://github.com/siddontang/ledisdb - a high performance NoSQL DB powered by Go (homepage)
- https://github.com/blevesearch/bleve/tree/master/geo - geo support in bleve
OpenStreetMap¶
At the moment, we use the reverse lookup API of OpenStreetMap as well as the their tiles for our Leaflet-based Places page.
Code: internal/maps/osm/location.go
Commercial Maps¶
Tutorials¶
- https://developers.google.com/maps/solutions/store-locator/clothing-store-locator#findnearsql
- https://blog.mastermaps.com/2014/08/showing-geotagged-photos-on-leaflet-map.html - Showing geotagged photos on a Leaflet map
- https://rubenspgcavalcante.github.io/leaflet-ant-path/ - Animate polylines as ants walking in a path