PDA

View Full Version : National grid coordinates from GPS



PeterJHB
July 28th, 2007, 10:54 AM
Now that Longitude & Latitude from a GPS track can be stored in exif, is it possible to provide a means of converting this to UK National Grid coordinates (in form SU eeee nnnn)? This would be more meaningful for those who work off OS maps.

This link provides an algorithm for this: http://tinyurl.com/2m8oaw

DavidB
July 28th, 2007, 05:49 PM
Peter

You usefully answer the questions posed by Chris when this question came up in this thread (http://www.breezesys.com/forum/showthread.php?t=2111) in April.

How were you proposing to use the co-ordinate data? It cannot be formally part of the EXIF or IPTC data; both are international standards which are unlikely to make provision for UK only data. But there are plenty of existing IPTC tags/fields in which the OS references could be stored ('Location' is a pretty obvious candidate!).

The easiest thing to do would be to create an HTML template that uses the Java script calculations from the page to which you link - 'easiest' that is for those whose HTML skills are better developed than mine. Perhaps someone would like to help?

David

PeterJHB
July 28th, 2007, 08:55 PM
David

Thanks for the reply.

How do I propose to use the information? Yes, I think that it should reside in IPTC somewhere. I can of course do the conversion off line and write it in. OK for the odd photo, but this would clearly be too time consuming for a large shoot. I am not much into HTML templates and Java scripts are beyond me, so it would need someone experienced in these areas.

The algorithm that I picked is one of many and not necessarily the best. There is quite a lot on the subject in the Ordnance Survey and other sites.

To answer another question that will occur to people: why do I want this? I take a large number of photos of wild plants. It would be helpful to be able to record the BNG reference, as I can then more easily revisit the precise spot where it was taken using an OS map. Also the national recording scheme uses BNG references. Lat & long are no use for this!

Peter

Chris Breeze
August 13th, 2007, 12:12 PM
I'm not sure whether it would be cost effective to add this to BBPro as it specific to the UK and would only be useful to a minority of people.

However, since the conversion code is in Javascript it should be relatively easy to include it in a web template. You would then be able to generate galleries using BBPro which show the location both as lat/lon and OS NGR.

PeterJHB
August 13th, 2007, 04:01 PM
However, since the conversion code is in Javascript it should be relatively easy to include it in a web template. You would then be able to generate galleries using BBPro which show the location both as lat/lon and OS NGR.

Chris,

Thanks, but I am not that advanced computer man. I would not know how to set about this.

Peter

PS - I am not asking that anyone to produce this! But if anyone is so inclined, a more accurate algorithm is on OS site, http://tinyurl.com/2g8vwd , which converts against a datum, ETRS89 Geodetic, which is equivalent to WGS84. It covers Great Britain, Northern Ireland and the Republic of Ireland, thus making it available to a wider public. The software can be downloaded free, from Quest Software on http://www.qgsl.com/software/gridiq.php , together with advice for software developers.

lobsterboy
September 2nd, 2007, 03:09 PM
Chris,

it might not be much work if you were to use this OCX (http://www.anotherurl.com/mapping/OSGB_Convert.htm), even has the source and C++ examples available.

HTH
Chris

PeterJHB
September 2nd, 2007, 03:44 PM
it might not be much work if you were to use this OCX (http://www.anotherurl.com/mapping/OSGB_Convert.htm), even has the source and C++ examples available.


Thanks for the idea, but this seems to convert only one way: OSGB to lat/long. As Downloader extracts lat/long, the conversion needs to be in the other direction.

Peter

Clive
September 2nd, 2007, 09:47 PM
I would not be happy paying for overload in BBP just to handle a local requirement for a group of islands somewhere in the North Sea! :p

If GB's, then also NZ's local mapping practices.

However, I do hope you are successful in tracking down an add-on solution to your quite reasonable local needs. Did the Controlled Vocabulary forum come up with nothing?

PeterJHB
September 3rd, 2007, 04:52 PM
I would not be happy paying for overload in BBP just to handle a local requirement for a group of islands somewhere in the North Sea!
I would hope that, once the basic system is set up, it should be possible to latch on other areas.


If GB's, then also NZ's local mapping practices.
Why not?


However, I do hope you are successful in tracking down an add-on solution to your quite reasonable local needs. Did the Controlled Vocabulary forum come up with nothing?
There are quite a number of "off line" methods, but these would be cumbersome, involving several stages - extracting data from EXIF, converting and then writing back to a different IPTC field.

Perhaps BBP is not the best route for this. I am also pursuing the requirement through the IMarch forum

Cheers Peter