OruxMaps
Visit the new forum: <a href="http://www.oruxmaps.com/foro">OruxMaps</a>

Join the forum, it's quick and easy

OruxMaps
Visit the new forum: <a href="http://www.oruxmaps.com/foro">OruxMaps</a>
OruxMaps
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Excellent!

2 posters

Go down

Excellent! Empty Excellent!

Post  pbda Fri Sep 23, 2011 1:25 pm

In June, I looked for off-road application for my new android phone. I wanted to use it for mountain bike in France and Spain (Pyrenees). My aim was to use the phone instead of paper maps. I already have another GPS (Edge 305) on handlebar to follow a track. Telephone is on my bag and is used only in case of doubt or just to know what is around a spot. I wanted to be able to see on the map a loaded track to follow and also to see my own current track.

I wanted to use (with or without conversion) stock of ECW maps I have already or CompeGPS on PC. I tried Geolives (only with french IGN maps), twonav, oziexplorer for android and OruxMaps. The later is clearly the better. Twonav and oziexplorer seem good at first glance but drains the battery quickly and cannot last a full day of mountain biking. After one day of use with Oruxmaps, my battery is still at 70% ! To save battery he trick is to degrade precision in track recording (or to not record at all). I wonder if Oruxmaps will remain so efficient when seamless map transition will be implemented.

To convert ECW maps for OruxMaps, I wrote a little shell script using gdal which creates fake .map files and jpeg bitmap. OruxMapsDesktop is then used to create Oruxmaps maps.

I use OruxMaps during the summer and it is really excellent ! I will try now beta version.

pbda

Cantidad de envíos : 7
Fecha de inscripción : 2011-09-23

Back to top Go down

Excellent! Empty gdal script

Post  ptitdoon Thu May 03, 2012 5:19 am

Hi,

Thanks a lot for the tip.
Could you please post your gdal script?
I did not get how to write map files....

Thanks a lot

ptitdoon

Cantidad de envíos : 2
Fecha de inscripción : 2012-05-03

Back to top Go down

Excellent! Empty Re: Excellent!

Post  pbda Thu May 03, 2012 8:28 am

I don't use these scripts anymore because Oruxmaps now support RMAP format and it's possible to convert directly ECW maps to RMAP with Compegps. You can use free version of Compegps. Anyway, the script was something like that:
Code:

#! /bin/bash
# :mode=shellscript:

dirECW=~/tmp/ECW
dirORUX=~/tmp/OZI

[ -d "$dirORUX" ] || mkdir -p "$dirORUX"
cd $dirECW || exit 1

for i in *.ecw; do
  nbase="${i%.ecw}"
  if [ ! -f "$dirORUX/$nbase.map" ]; then
    ll=$(gdalinfo "$i" | grep 'Size is')
    dimx=$(echo $ll | cut -d\  -f3 | cut -d, -f1)
    dimy=$(echo $ll | cut -d\  -f4)
    echo "$nbase.map -> $dimx x $dimy"

    cat > "$dirORUX/$nbase.map" <<Fin
OziExplorer Map Data File Version 2.2
$nbase.jpg
$nbase.jpg
1 ,Map Code,
WGS 84,, 0.0000, 0.0000,WGS 84
Reserved 1
Reserved 2
Magnetic Variation,,,E
Map Projection,(UTM) Universal Transverse Mercator,PolyCal,No,AutoCalOnly,No,BSBUseWPX,No
Point01,xy,0,0,in, deg, , ,, , ,, grid, , , ,
Point02,xy,$dimx,0,in, deg, , ,, , ,, grid, , , ,
Point03,xy,$dimx,$dimy,in, deg, , ,, , ,, grid, , , ,
Point04,xy,0,$dimy,in, deg, , ,, , ,, grid, , , ,
Point05,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point06,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point07,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point08,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point09,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point10,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point11,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point12,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point13,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point14,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point15,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point16,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point17,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point18,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point19,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point20,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point21,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point22,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point23,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point24,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point25,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point26,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point27,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point28,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point29,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point30,xy, , ,in, deg, , ,, , ,, grid, , , ,
Projection Setup,,,,,,,,,,
Map Feature = MF ; Map Comment = MC These follow if they exist
Track File = TF These follow if they exist
Moving Map Parameters = MM? These follow if they exist
MM0,Yes
MMPNUM,4
MMPXY,1,0,0
MMPXY,2,$dimx,0
MMPXY,3,$dimx,$dimy
MMPXY,4,0,$dimy
MMPLL,1,$lon0,$lat0
MMPLL,2,$lon1,$lat0
MMPLL,3,$lon1,$lat1
MMPLL,4,$lon0,$lat1
MM1B,4.0
MOP,Map Open Position,0,0
IWH,Map Image Width/Height,$dimx,$dimy
Fin
  fi
  [ -f "$dirORUX/$nbase.jpg" ] || gdal_translate -of JPEG -co 'QUALITY=90' "$i" "$dirORUX/$nbase.jpg"
done

pbda

Cantidad de envíos : 7
Fecha de inscripción : 2011-09-23

Back to top Go down

Excellent! Empty THANKS!!!!

Post  ptitdoon Thu May 03, 2012 11:35 am

this is helpful!

ptitdoon

Cantidad de envíos : 2
Fecha de inscripción : 2012-05-03

Back to top Go down

Excellent! Empty Re: Excellent!

Post  pbda Thu May 03, 2012 11:56 am

Oups ! It was a wrong version. This one is better:

Code:

#! /bin/bash
# :mode=shellscript:

dirORUX=~/tmp/OZI
[ -d "$dirORUX" ] || mkdir -p "$dirORUX"

for i in *.ecw; do
  nbase="${i%.ecw}"
  if [ ! -f "$dirORUX/$nbase.map" ]; then
    IFS='' info=$(gdalinfo $i)
    dimx=$(echo $info | grep 'Size is' | cut -d\  -f3 | cut -d, -f1)
    dimy=$(echo $info | grep 'Size is' | cut -d\  -f4)
    lon0=$(echo $info | grep 'Upper Left' | cut -c 16-25)
    lat0=$(echo $info | grep 'Upper Left' | cut -c 29-38)
    lon1=$(echo $info | grep 'Upper Right' | cut -c 16-25)
    lat1=$(echo $info | grep 'Upper Right' | cut -c 29-38)
    echo "$nbase.map -> $dimx x $dimy"

    cat > "$dirORUX/$nbase.map" <<Fin
OziExplorer Map Data File Version 2.2
$nbase.jpg
$nbase.jpg
1 ,Map Code,
WGS 84,, 0.0000, 0.0000,WGS 84
Reserved 1
Reserved 2
Magnetic Variation,,,E
Map Projection,(UTM) Universal Transverse Mercator,PolyCal,No,AutoCalOnly,No,BSBUseWPX,No
Point01,xy,0,0,in, deg, , ,, , ,, grid, , , ,
Point02,xy,$dimx,0,in, deg, , ,, , ,, grid, , , ,
Point03,xy,$dimx,$dimy,in, deg, , ,, , ,, grid, , , ,
Point04,xy,0,$dimy,in, deg, , ,, , ,, grid, , , ,
Point05,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point06,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point07,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point08,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point09,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point10,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point11,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point12,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point13,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point14,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point15,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point16,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point17,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point18,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point19,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point20,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point21,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point22,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point23,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point24,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point25,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point26,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point27,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point28,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point29,xy, , ,in, deg, , ,, , ,, grid, , , ,
Point30,xy, , ,in, deg, , ,, , ,, grid, , , ,
Projection Setup,,,,,,,,,,
Map Feature = MF ; Map Comment = MC These follow if they exist
Track File = TF These follow if they exist
Moving Map Parameters = MM? These follow if they exist
MM0,Yes
MMPNUM,4
MMPXY,1,0,0
MMPXY,2,$dimx,0
MMPXY,3,$dimx,$dimy
MMPXY,4,0,$dimy
MMPLL,1,$lon0,$lat0
MMPLL,2,$lon1,$lat0
MMPLL,3,$lon1,$lat1
MMPLL,4,$lon0,$lat1
MM1B,4.0
MOP,Map Open Position,0,0
IWH,Map Image Width/Height,$dimx,$dimy
Fin
  fi
  [ -f "$dirORUX/$nbase.jpg" ] || gdal_translate -of JPEG -co 'QUALITY=90' "$i" "$dirORUX/$nbase.jpg"
done

pbda

Cantidad de envíos : 7
Fecha de inscripción : 2011-09-23

Back to top Go down

Excellent! Empty Re: Excellent!

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum