[wp-hackers] EXIF geo data

Aaron Brazell emmensetech at gmail.com
Tue Mar 3 17:00:31 GMT 2009


On Tue, Mar 3, 2009 at 11:45 AM, Mike Little <mike at zed1.com> wrote:

> 2009/3/3 Otto <otto at ottodestruct.com>:
> > On Tue, Mar 3, 2009 at 3:14 AM, Mike Little <mike at zed1.com> wrote:
> >> I agree a standard meta data name makes sense, as does one which has
> >> been around for a while. My only minor reservation about a combined
> >> field, is that it is a little harder to parse than separate long and
> >> lat.
> >
> > The reason to have them together is so you can pull them both out
> > together. There's never an occasion where you need one and not the
> > other.
> >
>
> I was thinking of positioning posts on a map where you will want them
> separate.
>
> > And splitting them isn't that hard. If you've got "123.567,-12.345"
> > then all you have to do is:
> >
> > $meta = trim(get_post_meta($post->ID, '_geo_location', true));
> > list($lat, $long) = split(',', $meta);
> >
> > And voila.
> >
>
> Of course. But ugly to go in a theme  :-)
>

Lat and Long do go together like rama lama lama ke ding a de dinga a dong.
Sorry, Grease Ref there.

They do go together but really should be stored separately, or at least as a
serialized array. Data and presentation separation. It is possible for
someone to want to compute mathematical formulas on Latitutde or Longitude
individually. Each should also be filtered.

And yes, +10 for geocode info gathering. It always bothered me, as a
photographer, that WP seems to have a crippled approach to EXIF/IPTC data.


More information about the wp-hackers mailing list