photo / frontend

The official @github repository of the Trovebox frontend software. A photo sharing and photo management web interface for data stored "in the cloud" (i.e. Amazon S3, Rackspace CloudFiles, Google Storage).
https://trovebox.com
Apache License 2.0
1.38k stars 244 forks source link

Add a reverse geocoding plugin for photos containing a lat/lon #822

Open jmathai opened 12 years ago

jmathai commented 12 years ago

We should display a textual location when we can. There are two options.

  1. Store the location in the database with the photo (alter the db schema to support this)
  2. Perform this on the frontend with JavaScript

I prefer 1 for a few reasons. First, it works across platforms. The mobile apps don't have to reimplement the reverse geolocation lookup. 2nd it doesn't require run time processing every time a photo is viewed.

Something to consider is how precise we want the wording to be. Even though the lat/lon maybe extremely accurate we probably want to narrow it down to City instead of street address. Possibly using landmarks such as parks would be okay.

Here is MapQuests open implementation of some OSM reverse lookups. http://open.mapquestapi.com/geocoding/#reverse

hfiguiere commented 12 years ago

There is also Flickr shape files: http://code.flickr.com/blog/2011/01/08/flickr-shapefiles-public-dataset-2-0/

jmathai commented 12 years ago

That's really interesting. And released under creative commons. Definitely something we should have a look at.

cedricbonhomme commented 12 years ago

That's a nice idea. I like to geocode my photographs. I think that the solution 1 is really better. I also think that the name of the city is enough, but sometimes it may be nice to have the name of a well known place, for example "Red Square".

Moreover, I think that it would be nice to have a map displaying all localized photos. Maybe through a plug-in, or maybe by default. I've written a quick and dirty Python CGI script to do that (it uses OpenLayers): http://maps.cedricbonhomme.org/ or for example: http://maps.cedricbonhomme.org/?address=jmathai.openphoto.me https://github.com/cedricbonhomme/OsmOpenPhoto

jmathai commented 12 years ago

@cedricbonhomme That's pretty nice (the map with markers). We definitely need a map that displays where your photos were taken. I think it should be part of the core instead of a plugin. We can extend the map adapters, I think, which @hfiguiere wrote.

cedricbonhomme commented 12 years ago

@jmathai Thanks. Yes I think that it would be better to have it in the core instead of a plugin. I don't think it is to complicated and I think that with OpenLayers it possible to use Google maps too.

hfiguiere commented 12 years ago

And we need to store that string in the database. we can't reverse geocode each time. It will be updated if we update the location.

jmathai commented 12 years ago

The question becomes if we store this as part of the photo object itself or in a different object linked to from the photo object.

I think it should be in the photo object.

hfiguiere commented 12 years ago

for now the photo object should be fine - no DB change needed :-) We'll see when we want to be able to search locations.