automatic conversion of GPS fields LAT/LONG

Discussions about Expression Media

automatic conversion of GPS fields LAT/LONG

Postby snahl » Thu Jul 29, 2010 3:46 pm

It's good to have editable GPS data available.
By default iVMP/EM2 converts decimal GPS data automatically to degress° minutes' seconds'' format.

For example:
Entering Lat: 46.495517 produces N 046° 29' 43.86"
Long: 9.845728 produces E 009° 50' 44.62"

It would be great to have an option to select the format-type to decimal values.

One workaround is to define 2 custom-fields and convert the GPS values by scripting (provided enough custom fields are available).
Unfortunately all of the available 16 custom fields are used in my catalogs.

Another option would be to 'abuse' exisiting unused fields, but that isn't really a good solution.

From my viewpoint, the best would be to have an option-setting about how GPS values are converted and/or increase the number of custom-fields.

Any other opinons?
Posts: 10
Joined: Thu Jul 29, 2010 5:19 pm

Re: automatic conversion of GPS fields LAT/LONG

Postby rgstokstad » Sat Feb 25, 2012 1:00 am

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.


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.


Bob Stokstad
Posts: 11
Joined: Tue Jun 29, 2010 7:58 am

Re: automatic conversion of GPS fields LAT/LONG

Postby Sylvain M. » Thu Mar 29, 2012 2:40 pm

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.
Sylvain M.
Posts: 7
Joined: Tue Jun 07, 2011 7:05 pm

Re: automatic conversion of GPS fields LAT/LONG

Postby rgstokstad » Fri Mar 30, 2012 4:53 am

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=",(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=" 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=" 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.

Bob Stokstad
Posts: 11
Joined: Tue Jun 29, 2010 7:58 am

Return to Expression Media

Who is online

Users browsing this forum: No registered users and 3 guests