Preparation of file with stations coordinates
- Take a PMZ map file (you can download it from http://translate.google.com/translate?hl=ru&sl=ru&tl=en&u=http%3A%2F%2Fpmetro.su%2F).
- Change its extension from .PMZ to .ZIP and extract it into working directory.
- Find for files with .TRP extension (for example, in moscow.pmz you can see files Metro.trp, Trains.trp, TramsRiver.trp).
- These files contains sections names [Line1], [Line2],... For each section takes Name and Stations parameters and create a table from them (see a table format below).
- Find the coordinates for each station and append the coordinates to the table. You can take the coordinates from any map service or define by yourself from GPS sensor. Please, add coordinate origins in the first line of the comments.
- Save the table into a file using UTF-8 encoding. Lines and stations names must be equal to the ones in the corresponding TRP files. File must not contain empty lines. File name must be the same as the corresponding .PMZ file, but with .GPS extension. For example, for moscow.pmz file, the name of the file with stations coordinates
GPS table file format
1;<Line Name1>;<Station Name1>;99.999999;99.999999
2;<Line Name1>;<Station Name2>;99.999999;99.999999
3;<Line Name2>;<Station Name3>;99.999999;99.999999
- NUMBER - sequental number starting from 1
- LINE_NAME - line name
- STATION_NAME - station name
- LATITUDE - latitude of station
- LONGTITUDE - longtitude of station
How to test
- Copy created .gps file (for example, moscow.gps) together with corresponding .PMZ file (for example, moscow.pmz) into /sdcard/ametro/import folder on device.
- Starts aMetro.
- Open maps
- Go to Import tab.
- Use menu Refresh.
- Delete local map if exists and begin import of new one.
- Open map, in main menu use option "Where am I?". Application must display "look for coordinates" dialog and (if coordinates found) then scroll map to nearest station.