GpsMid
From OpenStreetMap Wiki
The GpsMid name come from GPS and MIDlet that is an java applet that don't work inside browser but on a JVM on a mobile phone.
Most of this article com from gpsmid.sourceforge.net.More information, forums, wiki,
GpsMid is opensource and licensed under the GPL if you want to help improve GpsMid.
Contents |
introduction
Overview
GpsMid is a map application for Java-enabled mobile phones .It provides view vector based rendering of OSM data, which gets pre-compiled into an efficient binary representation and directly linked into the midlet together with the application. This allows it to work even on those phones that prevent file system access to non signed applications, such as some of the Motorola phones. GpsMid also works on the Sony PSP (homebrew) with PSPKVM (currently with Sony's GPS only).
Requirements
GpsMid works on devices supporting mobile java (J2ME), more specifically those supporting the following specs:
- Connected Limited Device Configuration (CLDC-1.1)
- Mobile Information Device Profile (MIDP-2.0)
- optionally to get the most out of GpsMid the following Java Specification Request are useful (JSR 179 for internal gps, JSR 82 for Bluetooth, JSR 75 for File access, JSR-135 for taking geocoded photos and enabling voice guided navigation).
Features
- GPS localisation using GPS (external via bluetooth, builtin, SiRF, Cell-id based proximity (using OpenCellId.org))
- Vector rendering, arbitrary map zoom, auto rotating in movement direction
- Customization of rendering styles through a StyleSheet
- Search for road / POI names, search for closest POI of some category
- Recording GPX tracks, storing waypoints
- Turn-by-turn voice guided navigation (supporting different modes of transport e.g. cycling and walking)
- Adding new POIs to OSM directly from your phone.
- Editing tags on existing ways.
Development
Report bugs at [1]
Feature requests at [2]
Discussions at [3]
CVS repository at [4]
News
Supported / Unsupported Phones and other devices
Most phones that have j2me and are not too old should be supported. For more details however see the wiki on Sourceforge.
Thanks to the increasing number of available JVMs, it is becoming possible to run GpsMid on a variety of devices other than just phones, such as for example SatNavs, Sony PSPs and Nokia N8xx internet tablets. More details on running GpsMid on these devices can be found here - instructions for running on WinCE devices here
Supported file
The extension file that could be use in this article and usefull in the end for work with GPsMid ( create map , record data )
- GPX :file for storage lat/long/name location
- arm : audio file compatible with many mobile devices and software ( [arm2wav]/nokia audio/ real player)
- png : read raster image for poi
- .xml/.dtd read have default name style-file that define default display style but can be custom ( see GpsMid/StyleSheet )
- osm : specific vector format file of osm map for storage data directly on filesystem instead database.
- properties : file use for contain boundingbox,stylesheet, tag information usefull for gpsmid .
OSM Waypoints
There is a patch for GPSmid that extends the waypoint feature by the possibility to use JOSM presets. --Alexm 10:51, 26 August 2009 (UTC)
This patch integrates the presets with GpsMid so that the user can add the tags to the positioning data directly from the mobile phones.The tagged data is then can be sent to the server as SMS.A server side utility called "SmsImporter" is provided which generates the OSM files from the received SMS. The GpsMid also gets option to export the OSM tag to a OSM file.
- UI:
1) Menu "Recordings\Save OSM Waypoint" Provides a list of preset groups and preset items.A tag entry dialog is presented once the preset item is selected.After entering the tag data,an option is provided to send the sms to a number which is configurable. 2) "Manage Waypoints\Export all OSM waypoints" Exports the waved waypoints to OSM format. 3) "Manage Waypoints\Edit" Allows the editing of already entered tag data.
- Configuration:
1) Osm2GpsMid This application gets following new properties that can be supplied at the time of GpsMid package creation. smsReceiverCount - The total number of SMS receivers that will handle the SMS containing OSM tag data smsReceiver[N] - The actual sms numbers where N=1..smsReceiverCount.A special value "nosms" will disable the SMS sending option. preset-file - The full path of the presets.xml file.If no path is given then current folder is looked for the file.
- SmsImporter:
This is the application that accepts the tag data sent with SMS and generates a OSM file out of it. It needs to be placed on the same level as of GpsMid and Osm2GpsMid. It accepts the SMS text directly on command line or from withing a text file with each line representing a sepaarte SMS text.It's syntaxt is:
java -jar smsimporter.jar presets_file out_file [SMS text][-f in_file]
where presets_file is the full path to the presets file out_file is the output file containing the OSM tags in_file is the input file containing the OSM tag data sent with SMS.Each line represents a distinct SMS text
- Building:
The GpsMid and Osm2GpsMId can be built as before by typing "ant" on the root folder.
Building "SmsImporter" can be done on the same lines by typing "ant" from the "SmsImporter" folder.
Both Osm2GpsMId and SmsImporter need to have GpsMid built beforehand. SmsImporter is to be exctracted at the same level as of Osm2GpsMId and GpsMid so as to have 3 folders GpsMid, Osm2GpsMid and SmsImporter at the same level.
GpsMid software
A mid software is a software that follow the MIDP specification and be implemented by Sun library under the name of JSR-118.The MIDP 2.0 reference implementation (RI) and technology compatibility kit (TCK) can be licensed today for commercial use through Sun's Java Partner Engineering group.
java environment compiler
You ll need for that to install many software related to java, phone GpsMid like
- Java JDK 6 () [5]
- J2ME Polish (65 Mo ) [6]
- eclipse () [7] and EclipseME plugin () [8] to help develop J2ME MIDlets
- cvs ()[], git subversion tool () []
- Sun Java Wireless Toolkit - WTK (38Mo) [9]
- ant () [10] and Antenna () [11] for Wireless Java
- proguard () [12]
- JNLP WebStart technology that is use by Sun download manager ()[13]
- eclipse Mobile Tool for java (8Mo) sdp-mtj-runtime-1.0.zip
cvs chekout for Gpsmid and Osm2GpsMid cvs -d:pserver:anonymous@gpsmid.cvs.sourceforge.net:/cvsroot/gpsmid login cvs -z3 -d:pserver:anonymous@gpsmid.cvs.sourceforge.net:/cvsroot/gpsmid co -P GpsMid cvs -z3 -d:pserver:anonymous@gpsmid.cvs.sourceforge.net:/cvsroot/gpsmid co -P Osm2GpsMid
best it to follow the web page here to know howto instal MIDlet eclipse IDE and plugin
Download GpsMid
Go To
There are also some pre-bundled maps available for some select regions that can simple be copied over to the phone and are ready to use. If your city / region isn't amongst them, you can ask for it to be added on the forums.
compile GpsMid
- all new spec of GpsMid could be find here
- Compile it and install it on your phone using the instructions on the GPSMid site.
GpsMid jar structure
- jsr179 contain class file
- gps contain class file
- importexport contain class file
- GpsMidAmst-Amsterdam-0.5.09 contain png,amr,class, binary map file ( *.d) d
install GpsMid
gpsmid must be install with map call midlet so see chapter after map chapter call install gpsmid and map
map
create custom map
For have gpsmid application and map to use in , you need to download a map (*.osm) that could contain the max 9 the bounding box that ll define in a text file (*.properties).
osm file
The osm file that contains Data_Primitives can be very big depending on the area request. If the area size is big, the best is not to use web/script/local gis client but rather a snapshot of the OpenStreetMap postgres( not postgis) database in osm file format (.osm.bz2 or .osm )using htp or ftp protocol. Even that the osm file could be obtain using
- Planet.osm
- web gis client
- osm big snapshot
- JOSM
- www.openstreetmap.org |zoom to your area | Export
- if osm file doesn't work try geofabrik by department file
properties file
the properties file is a text file that contain information about the area/BoundingBox and information compatible with your device (java library version and device specification ). The file could be create by create a txt file and change the extension by properties. Better is use text editor like Notepad ++ or PSPad .
The information of the bounding Box can be find by
- Go to informationfreeway.org and look at the bottom right side lat long information
- Go to www.openstreetmap.org |zoom to your area | Export
- Open *.osm file with text editor because the beginning of the file contain lat/long/min/max information !!
<?xml version="1.0" encoding="UTF-8"?> <osm version="0.6" generator="OpenStreetMap server"> <bounds minlat="50.2726" minlon="3.3531" maxlat="50.3148" maxlon="3.4149"/> <node id="123199"
The variable name app define wich gps functionnalities the java midlet ll support ( if the device also support it ) here the table of the meaning of the predefine value wird
sign IMEI *#06# more
| app | Bluetooth( BT) GPS | BT File Transfer | JSR 179 internal GPS (1) | GPX parsing | |
| Generic/full | yes | yes | yes | yes | |
| Generic/full-nolocation | yes | yes | no | yes | |
| Generic/minimal | yes | no | no | yes | |
| Generic/minimal-bt | yes | ??? | yes | yes | |
| Generic/no-obex | yes | no | no | yes | |
| Generic/no-xml | yes | ?? | no | yes |
1: JSR-179 functionality is only available in the midlet if you set "app=GpsMid-Generic-full" in the .properties file. Note: This is not required anymore with Osm2Gpsmid 0.4.51 or higher as optional JSR-179 functionality is by default compiled in
bundle.name=bundlename region.1.lat.min = 48.8 region.1.lat.max = 48.9 region.1.lon.min = 2.25 region.1.lon.max = 2.41 region.2.... ( max 9 regions ) #default a generic distribution without locationProvider api app=GpsMid-Generic-multi #a generic distribution with locationProvider api #app=GpsMid-Generic-loc #app=GpsMid-Motorola-Motorazr_V3i #app=GpsMid-Siemens-SL75 #app=GpsMid-Sony-Ericsson-K750 #-------------------------- #to get less Data you can leave out some details #everything defaults to true otherwise use false useHighway=true useRailway=true useRiver=true useCycleway=true useAmenity=true useLanduse=true useNatural=true useLeisure=true useWaterway=true #----------------------------------------------------- #new since 0.2.31 choose any name for the midlet # you can then have 2 versions with different locations # on your phone. midlet.name=Midletname
- style-file.dtd that could be find in Osm2GpsMid
- the tool
You ll need
- java virtual machine for use java software specific OS
- OSm2GpsMid.jar to convert osm/properties files into jad and jar file
- set the environnement variable to not explicit use the all path to java executable locate by default in "C:\Program Files\Java\jre1.6.0_03\bin\" so we can use OSm2GpsMid.jar by write in comandline window ( start|Execute |cmd |copy ... paste ..custom sentecne)
java -Xmx1024M -jar OSm2GpsMid-version.jar osmvector.osm osmprop.properties
This will create two files of with extension name .jar and .jad. The two must be copy to the filesystem of the phone; the smaller file (jad file) work like an installer for phone that don't have one by default . so if launch ( open) jar file don't work try to launch jad file !! The nmae of the two file are the same and the scheme is
"bundle.name"-"midlet.name"-"version".ja(d|r) of Osm2GpsMid that have been use ( see chapter on nokia)
output error message during compile osm/properties input file
many of errors find are no solution in the GpsMid FAQ so post your in the forum
Error: Tile is unsplittable, but too large
download pre built map
- Sourceforge let you select some pre-bundled maps available for some select regions that can simple be copied over to the phone and are ready to use. If your city / region isn't amongst them, you can ask for it to be added on the forums.
- Geothings let you select area boundingbox and generate a midlet
install map
see chapter call install gpsmid and map
Editing Map
Currently GpsMid is not a full editor, but does at least allow some data maintenance in the field. Currently, it allows you to select a way in the map and edit or add tags of that way and directly upload the changes to the main openstreetmap database. This can be useful for example to quickly add a missing name, a speed restriction, set it to oneway or add some of the other meta data that is often still missing from ways.
The way it works is to store the osm way id in the offline map data. If you then select that way for editing, it will connect via the internet to the API and download the current way data and display its tags. Once you have added or corrected any tags, you can upload the way and commit it to the database. Given that it retrieves the tags freshly from the database, not having updated the map of GpsMid shouldn't be problematic, although having fresh maps is preferable
As this feature requires internet access on the phone, and one of GpsMids main features is to be an offline application, these features aren't enabled by default. In order to enable them, you need to choose the following settings in your .properties file with which you create your midlet. You will need to set the app parameter to app=Generic-editing (or with Version 0.5.00 app=GpsMid-Generic-editing) to enable online features in GpsMid and you need EnableEditing=true to include the necessary information for editing in the map build. With that you should be ready to start editing the map on the go.
So far the editing support is limited, but hopefully more features, especially POI editing will follow soon.
install gpsmid and map
The jar file GpsMid and map could be install on rea ldevice or emulator
real device
Installation depend of the java device you use and the sofwtare bundle with your phone to manage java installation software ( default executable file on PC OC before install have specific extension like cab in window mobile , sys in symbian and jar jad for j2me). See for example the nokia chapter.
On your device ;set the security options for GPSMid on your phone to allow it to connect to bluetooth, access multimedia, and read and write user data with as little user interaction as possible (On my Sony-Ericksson K510i you do this in the "Permissions" menu option on the GPSMid file).
Find the directory where the phone software have install your GpsMid and then copy the map file to the directory .
Pre-bundled midlets are currently only provided for a few demonstration areas due to space restrictions. You can however easily create a bundle for your custom region by yourself. Look at Osm2GpsMid to find out how to create such a bundle. Each jar-file is a bundle of the application itself and some map data. Either send the midlet via bluetooth or simply copy it (.jar and .jad file) to the correct directory on your device. Choose install new and select the jar file.
here a details way to sign java midlet using cert and not imei .find IMEI is easy using *#06# more
| ....OS | .... device | .... binary | .... Synchronisation sdk-soft | authorities | sign soft/url | installer / download |
| Symbian | nokia | .sis | sdk | url/soft | PCSuite novi | |
| Window CE 4.2 | HTC | .cab | [Visual studio] | Active sync ( 2000-xp) | ||
| window Mobile | HTC | .cab | Window Mobile device Center | |||
| Research In Motion’s | Blackberry | .zip | BlackBerry Desktop manager Software | |||
| apple | iphone ipod | .dmg | itunes | Nikita / | itunes | |
| Sun | device with JVM | .class .jar .jad | MIDPSun Wireless toolkit [ carbide j] [ OpenSSL] | ThawteVerisign | web | |
| qualcomm | brew | web | opera brew browser |
- see the step ( gui/shell pc/mobile-device) to install midlet on the nokia n95 device here
emulator
Install Sun Java Wireless Toolkit for CLDC and read the user Guide to test midlet emulator
user manual
navigating keyboard
- '2468' : move map
- '5' key ...: center map
- '1/3' key : zoom in out .
- '*' Opens a setup dialog to configure some display options
- '*' hold for a second to jump to the waypoint menu
- '0' toggles between full screen mode
- '0' hold for a second to toggle track recordings on or off
- '#' key : start recording voice
- '#' double clicking : Stop recording voice
- '#' hold for a second to jump to the tracklog menu
- '#' Keeps the backlight on even with no key activity
Menu items
map
search
setup
setup mapsource
About
Log
manage Audio
It is possible to use GPSMid for Audio Mapping as it allows the user to record sound clips, and creates a GPX waypoint associated with each clip. The audio clips and GPX file can then be processed for use in JOSM for mapping.
The process for doing is explain below: : .
record voice
- Start GPSMid and associate it with your bluetooth GPS receiver (in the settings screen). Also set the GPX output to go to C:\Other in the settings screen, then go to the map screen.
- Record an audio clip by double clicking the '#' key. (Note that currently you have to say 'yes' to a few questions about allowing the program to access user data - I'll try to make this go away in a future version). The first time you do this you may also have to select the destination directory for the audio clips. I use C:\Other.
- Stop the recording by double clicking the '#' key again.
This process leaves you with a lot of audio clips in your phones memory, and the GPX waypoints hidden in GPSMid's own storage area. To get these in to JOSM on your PC, do the following:
- In GPSMid, go to 'Manage Waypoints' from the map screen. Select 'Send All'. I have this configured to write to C:\Other - the same place as the audio clips go. This puts a file 'waypoints.gpx' in C:\Other on the mobile phone.
- Exit GPSMid and use your phone's file manager to send the files to your PC, using either bluetooth or a USB connection. Store the GPX file and the audio clips (*.amr) in the same directory on your PC.
use in josm
- To use these in JOSM, the audio files need converting into .wav files, and the GPX file needs <link> tags adding to point to the audio files. A little python script amr2wav can be used to do this. Just running "amr2wav" in the directory containing the files should be all you need to do [Note though that you need ffmpeg to do the conversions. It might be necessary to re-compile ffmpeg from source to add amr support]. This creates a .wav file for each .amr file referenced in the GPX data, and a new GPX file "waypoints_wav.gpx".
- Start JOSM and open "waypoints_wav.gpx". You should see a marker for each audio file. Clicking on the marker should play the clip.
- Job done!
Notes: Although having to say 'yes' to allow the application to write user data sounds like a real pain, it is surprising how easy it is to get used to how many times you have to press the OK key. It also appears that the later Sony-Ericsson phones that use "Java Platform 8" allow you to switch off the prompts for file access - I have ordered one to see if this works.
device
microemulator
have a look to here to test java allet demo on line
n95
the specification
The specification of the nokia in thoses screenshort are
- nokia firmware : v31.0.017 16-12-08 rm15 @nokia N95 (01.01)
- symbian OS :Symbian 9.1 - S60 3rd Edition
- PCSuite : 7.1.30.9
- java : CLDC 1.0-1.1, MIDP 1.0-2.0, JSR-75 ( File system ), JSR-82 ( Bluetooth ), JSR-120 ( Wireless Messaging API ) , JSR-135 ( Mobile Media API ) , JSR-179 ( Location Provider API ) , JSR-184 ( Mobile 3D Graphics API )
- audio codec : aac inside container amr ? or video codec ? ( h263 v0, mpeg4, real media 8)
troubleshooting
- lack support for getting LAC (Location Area Code) in j2me, which might sometimes cause incorrect locations to show up.
- audio setting must activate
installation GpsMidAmst-Amsterdam-05.09.jar
Transfer gpsmid to nokia icon in PC suite will start the installation of the software on the connected nokia device ( usb connection)
copy midlet
some midlet are pre build [14] and need only copy the file of your location to the device directory
launch
It take 10 second before the first GpsMid window appear !!
configure
custom Midletname-bundlename.jar
compile
java -Xmx1024M -jar OSm2GpsMid-version.jar osmvector.osm osmprop.properties >Midletname-bundlename-0.5.00.jad >Midletname-bundlename-0.5.00.jar
[Image:http://wiki.openstreetmap.org/images/5/5c/GpsMid_map_compile.jpg]
copy installer files
- copy jad jar file to device
launch installer files
- For this we ll install and use FExploer for nokia n95 then go to the directory where is locate ours files for click on the jad file. It ll process install jar application on symbian OS
test
- Go to nokia menu |application |name of your midlet



























