Active Topics

 



Notices


Reply
Thread Tools
Posts: 13 | Thanked: 14 times | Joined on Aug 2010
#1
I have a need to display the current location in Ordnance Survey coordinates so I thought I'd have a quick hack and see how easy it was/wasn't.

This is the result...

The application is only two python files at the moment - to use them you will need to install the PyQt libraries and the QtMobility libraries for python from extras or extras-devel. It is definitely for experiment only, but it works for me.

You will also need to obtain the file "OSTN02_OSGM02_GB.txt" from the zip file provided on the Ordnance Survey website here. This contains the mappings for the OSTN02 transform which is the most accurate way of converting the GPS latitude longitude into OS coordinates.

Copy the python files and the text file into the same directory and run from the terminal with the command "python osgb.py" (or use run-standalone and an icon if you prefer). Its all a bit amateur at the moment, sorry.


There are no options or anything, it just displays the current coordinates, altitude (from the GPS, unfortunately I can't correct that as I don't know what the GPS does internally), satellite fixes, and speed. It also writes a kml file to the directory with the path followed whilst it is running. This is always called osgb.kml.

I plan to make it pick up any photographs, videos, notes or the like made whilst it is running to turn into a big kmz file, but that's for another day.

If it is useful, or even potentially useful, let me know!
Attached Images
 
Attached Files
File Type: zip OSGB.zip (6.5 KB, 244 views)

Last edited by Dr Random; 2010-11-11 at 01:07.
 

The Following 10 Users Say Thank You to Dr Random For This Useful Post:
Posts: 248 | Thanked: 240 times | Joined on Mar 2010 @ Wiltshire, UK
#2
Now that is useful - thanks for sharing your work.

I live in a rural area and sometimes need to record and share a remote location; some months ago I was trying to advise the police of the location of a stolen car - OS co-ordinates are the best media for this.

Now all I need is something like ViewRanger or similar to display OS maps on the N900 (wth or without GPS)

Any ideas?

I'll give you some feedback in a week or so, and thanks once again.
 
Posts: 118 | Thanked: 89 times | Joined on Aug 2010
#3
Great for me too. I do some walking in the Lake District so this is a great addition to OS maps and useful confirmation that I am where I think I am!
Thanks
 
Posts: 13 | Thanked: 14 times | Joined on Aug 2010
#4
Thanks - I'll keep posting updates here, in that case.

It is actually possible to use OS 1:25k maps in Mappero, if you start off with a georeferenced TIF file. These are available in 10km x 10km tiles, with world files available from the OS.

http://www.ordnancesurvey.co.uk/oswe.../techinfo.html
http://www.ordnancesurvey.co.uk/oswe...boutpopup.html

The tiles can be purchased from http://www.mapyx.com/index.asp?tn=productview&pid=6635 - although you could probably stitch something from http://www.ordnancesurvey.co.uk/oswebsite/getamap/ (or multimap). Unfortunately if you want to buy a large area (eg the Lakes), it would be quite expensive.

I convert them using GDAL tools in linux - but I'm not sure how to do it in windows. I'll post a recipe later.

The trick is to split the area you need into tiles and then write them into the Mappero cache directly.

Last edited by Dr Random; 2010-11-12 at 12:19.
 

The Following 2 Users Say Thank You to Dr Random For This Useful Post:
Posts: 961 | Thanked: 565 times | Joined on Jul 2007 @ Tyneside, North East England
#5
That is a really cool, and useful little utility. I will definitely be installing this just in case I ever need it. As Noktokdaddy says certainly emergency services like grid refs.

Couple of features I can think of which would be helpful are

1. Have a button to open the OS web page with the grid ref centred, so you can see where you are. Having the tile displayed in the app would be nice, but I know how protective the OS are of their maps.

2. being able to add in a list of grid references, and being able to see the distance to them, and have a configurable proximity alert when you get close. This is from my days of MTB orienteering (Polaris). Being able to bang along, and have the phone well you when you are close would have been really helpful.

Thanks for this.

Gaz
__________________
______________________________

Nokia 770 (2gb) since Aug 2007
Nokia N800 (32gb) since Dec 2007
Nokia N810 (16gb) since Sep 2009
Nokia N900 (64gb) since Aug 2010 ______________________________
 
Posts: 13 | Thanked: 14 times | Joined on Aug 2010
#6
Just a note to say that I'm still working on this!

I had trouble getting a suitable website to launch with the current location; Streetmap print page is the best I could find but there are too many adverts. The OS has a print view on Getamap without adverts but the default file size for 1:25000 is much larger than it needs to be. So I've given up on that for now. If you know of a good website address to point to I'd be grateful!

The idea of this application is to record things rather than provide mapping (Mappero works for that, including importing OS 1:25000), so I'm not too bothered about mapping at the moment.

So suggestion 2 is work in progress. The points recorded (or imported) will have a name, comment, a list of attributes (eg objects found at the location such as plant species) and hopefully the ability to record an audio file. Will post another version when I have something working.
 
Posts: 51 | Thanked: 48 times | Joined on Jun 2010
#7
>>Now all I need is something like ViewRanger or similar to display OS maps on the N900

Quickie for others who are looking for a a good way to view Ordnance Survey maps on their N900 (in offline mode)
I'm using the method outlined here: http://blog.absorb.it/2011/01/26/map...ad-for-mappero

Basically, on the PC:
* Download and run Mobile Atlas Creator: http://mobac.dnsalias.org/
* Select "OS Explorer Maps" as the source
* Set Atlas Settings format as "OSMTracker Tile Storage"
* Select area in map view/set zoom levels/add selection/create Map
* Copy the atlas structure (the numbered directories with the png's in them) from PC to /home/user/.maps/OpenCycleMap

On N900 Open Maep (or Mappero/eCoach/anything else that uses the above cache location) and choose OpenCycleMap as the map source.

When you move to the right area/zoom level, you'll get the Ordnance Survey maps you downloaded (instead of the OpenCycle map) ...OK, it's not the cleanest/nicest method, but it works, and works well.

Extra points for running Mobile Atlas Creator on the N900 itself

PS: I've used OpenCycleMap as an example storage area, but you can use GoogleMaps or something else if you prefer...

PPS: Thanks for the Grid converter, Dr. Random...

Last edited by thegman; 2011-03-07 at 15:38.
 
casper27's Avatar
Posts: 844 | Thanked: 521 times | Joined on Jan 2009 @ UK southampton
#8
Which Python Libraries does this need? Does it need the full python install?
 
casper27's Avatar
Posts: 844 | Thanked: 521 times | Joined on Jan 2009 @ UK southampton
#9
Hey gus any help appreciated, im getting this error even though im pretty sure I have installed correct Qt libraries and Mobility.

~/MyDocs/OSTN02_OSGM02files $ python osgb.py
Traceback (most recent call last):
File "osgb.py", line 21, in <module>
from QtMobility.Location import *
ImportError: No module named QtMobility.Location

Not too great with Python so any help appreciated.
 
Posts: 51 | Thanked: 48 times | Joined on Jun 2010
#10
Code:
apt-get install python-qtmobility.location
Not sure if that's from extras-devel or if it's in extras now
 

The Following User Says Thank You to thegman For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 00:33.