maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] OSGB - show location in UK coordinate system on N900 (https://talk.maemo.org/showthread.php?t=65436)

Dr Random 2010-11-11 01:00

[Announce] OSGB - show location in UK coordinate system on N900
 
2 Attachment(s)
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. :o


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!

NokTokDaddy 2010-11-11 06:51

Re: [Announce] OSGB - show location in UK coordinate system on N900
 
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.

br1zer 2010-11-11 22:20

Re: [Announce] OSGB - show location in UK coordinate system on N900
 
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

Dr Random 2010-11-12 12:16

Re: [Announce] OSGB - show location in UK coordinate system on N900
 
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.

gazza_d 2010-11-13 06:31

Re: [Announce] OSGB - show location in UK coordinate system on N900
 
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

Dr Random 2011-01-18 23:10

Re: [Announce] OSGB - show location in UK coordinate system on N900
 
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.

thegman 2011-03-07 15:33

Re: [Announce] OSGB - show location in UK coordinate system on N900
 
>>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...

casper27 2011-04-01 16:44

Re: [Announce] OSGB - show location in UK coordinate system on N900
 
Which Python Libraries does this need? Does it need the full python install?

casper27 2011-04-03 22:08

Re: [Announce] OSGB - show location in UK coordinate system on N900
 
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.

thegman 2011-04-04 08:23

Re: [Announce] OSGB - show location in UK coordinate system on N900
 
Code:

apt-get install python-qtmobility.location
Not sure if that's from extras-devel or if it's in extras now :)


All times are GMT. The time now is 04:07.

vBulletin® Version 3.8.8