Skip to main content

⚠️ Please note that this topic or post has been archived. The information contained here may no longer be accurate or up-to-date. ⚠️

automatic conversion of GPS fields LAT/LONG

Comments

3 comments

  • rgstokstad
    I just downloaded a 30-day trial of media pro. My hope was that this problem had been fixed and it would be possible to have the GPS long and lat in decimal form.

    Why?

    Because accessing these data with (iView:Latitude) produces numbers with a single apostrophe (' for minutes) and a quote (" for seconds). This plays hell with trying to use (iView:Latitude) and (iView: Longitude) in html code in a href=" ....." line in my media.html template. The browser interprets the minute symbol " on the Latitude coordinate as the end of the link.

    I wanted to add a map link to google under the geo-encoded photos in a gallery and this has stymied me. I'm sure I can eventually find a work around with scripting or java script. But that's a pain, and hardly a reason to upgrade from my current Expression Media 2.

    I'd be happy if the encoded gps data in a photo file was just left alone and not converted "by default" to the rather outdated minutes/seconds format. A choice would be fine, but a change to decimal is what's most important important to me.

    Thanks,

    Bob Stokstad
    0
  • Sylvain M.
    it would be possible to have the GPS long and lat in decimal form.


    I don't have any solution, but I would like approve your proposal and ask the Media Pro team this development, very useful for me.
    (I'm french, and don't speak english very well : excuse me !)

    Sylvain M.
    0
  • rgstokstad
    Here's a solution for making a link to Google Maps for a geo-tagged image in an Expression Media II gallery. It's a hack, implemented using the terminal and command line in Mac OS X, but it does the job.

    Insert the following line at some appropriate place in the media.html template.

    <a href="http://maps.google.com/?hl=en&q=loc:(iView:Latitude),(iView:Longitude)"target="_blank" >Google Map </a>

    ----

    After running Make HTML Gallery, this produces the following line of code in a .html file located in the source folder of the resulting gallery.

    <a href="http://maps.google.com/?hl=en&q=loc:N 036° 43' 21.56",W 121° 16' 45.14""target="_blank" >Google Map </a>

    (This line will not work in a browser because of the quotes - the symbol for seconds of arc - on the values for Lat and Long.)

    ------

    This can be repaired by running the following unix shell script to remove the offending quotes from all of the .html files in the source folder.

    for i in *.html; do sed -e 's/",W/, W/g' -e 's/""/"/g' <$i > $i.temp; done;for file in *.temp ; do mv $file `echo $file | sed 's/.temp//'` ; done

    ----

    This script, operating on the above line of html code, produces

    <a href="http://maps.google.com/?hl=en&q=loc:N 036° 43' 21.56, W 121° 16' 45.14"target="_blank" >Google Map </a>

    ------

    Google maps understands this link and produces the desired map.

    As an example this solution has been implemented in producing the following gallery.



    Note, I was unable to find a solution that could be implemented in the media.html template. Indeed, I believe such a template-based solution does not exist because of the presence of both ' and '' in the i-View values for Lat and Long.

    The lesson: If the Lat and Long values in Media Pro were changed to decimal form, this hack would be unnecessary.

    Cheers,
    Bob Stokstad
    0

Post is closed for comments.