Michelin France map projection

Started by orumxmaps=1a, November 09, 2014, 01:02:55 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

orumxmaps=1a

Hello,



Thank you for OruxMaps. I like to use it.



I am new in tthis forum, I try to have Michelin France map 1:185.000 (online viamichelin). I successfully created a database with tiles (60 x 60 / 200MB). In Android it shows the map, but it is very poorly calibrated. Some location are just fine, other differ in west/east about 100km!

I looked for calibration data and I found these settings:



Projection : Bonne

Origin : 2°20'14" E / 48°51'36" N (Paris)

Ellipsoide : Plessis

f = flattening = 0.0032400188611

a = axis = 6376523 m

DX, DY, DZ in relation withWGS 84

DX = 118 m

DY = 23 m

DZ = 66 m



I started to understand QGIS and I could see these settings are correct...



Now I would like to put these settings in otrk2.xml. I dont want to reproject tiles due to quality loss. But I cannot find out how to do this. oruxMapsDesktop does not help.



I tried

<MapChunks xMax="60" yMax="60" datum="WGS84" projection="Bonne,2.337,46.8,0.99987742,600000,2200000" img_height="512" img_width="512" file_name="Michelin France" />

but no success



Someone can help me please :-)



Have a wonderfull day with OruxMaps!





Latest RC1 shows .map file in KitKat correct again! Thank you!

orux

#1
Quote from: "orumxmaps=1a"Hello,



Thank you for OruxMaps. I like to use it.



I am new in tthis forum, I try to have Michelin France map 1:185.000 (online viamichelin). I successfully created a database with tiles (60 x 60 / 200MB). In Android it shows the map, but it is very poorly calibrated. Some location are just fine, other differ in west/east about 100km!

I looked for calibration data and I found these settings:



Projection : Bonne

Origin : 2°20'14" E / 48°51'36" N (Paris)

Ellipsoide : Plessis

f = flattening = 0.0032400188611

a = axis = 6376523 m

DX, DY, DZ in relation withWGS 84

DX = 118 m

DY = 23 m

DZ = 66 m



I started to understand QGIS and I could see these settings are correct...



Now I would like to put these settings in otrk2.xml. I dont want to reproject tiles due to quality loss. But I cannot find out how to do this. oruxMapsDesktop does not help.



I tried

<MapChunks xMax="60" yMax="60" datum="WGS84" projection="Bonne,2.337,46.8,0.99987742,600000,2200000" img_height="512" img_width="512" file_name="Michelin France" />

but no success



Someone can help me please :-)



Have a wonderfull day with OruxMaps!





Latest RC1 shows .map file in KitKat correct again! Thank you!


Hi,



sorry, but Bonne projection is not supported;





It is a very unusual projection.





orux

orumxmaps=1a

#2
Thank you for this fast answer.

So I cannot use this map with GPS. Just for hand-on scolling thou.



Just for archiving the MOBAC bsh script to get viamichelin tiles (completly out of calibration!). Bonne projection!

I like zoom level 12. It is located at (0,0) TL to (60,60) BR tiles.



__________________________



static import java.lang.Math.*;



name = "Michelin France (zoom12 up left)";

tileType = "png";

tileSize = 256;

minZoom = 2;

maxZoom = 16;

tileUpdate = TileUpdate.IfModifiedSince;

backgroundColor = "#ffffff";

ignoreError = "True";



String urlstring(int zm,int r,int c) {

   int[] tile;

   int new_zoom=zm-2;

   String zs;

   switch (new_zoom)    {

      case 0  : zs="wot_0180m_r02"   ; break;

      case 1  : zs="woc_0090m_r02"   ; break;

      case 2  : zs="woc_0045m_r02"   ; break;

      case 3  : zs="woc_0024m_r02"   ; break;

      case 4  : zs="woc_0012m_r02"   ; break;

      case 5  : zs="woc_6000k_r02"   ; break;

      case 6  : zs="woc_3000k_r02"   ; break;

      case 7  : zs="woc_1500k_r02"   ; break;

      case 8  : zs="eur_c_1000k_r05" ; break;

      case 9  : zs="fra_c_0275k_r061"; break;

      case 10 : zs="fra_c_0185k_r061"; break;

      case 11 : zs="eur_c_0060k_r08" ; break;

      case 12 : zs="eur_c_0024k_r08" ; break;

      case 13 : zs="eur_c_0012k_r08" ; break;

      case 14 : zs="eur_c_0006k_r08" ; break;

   }

   tile = rc2tile(r,c);

   int tileA = tile[0];

   int tileB = tile[1];

   String tilestring = tiles2string(String.valueOf(tileA),String.valueOf(tileB));

   String mapb64string = Tools.encodeBase64(zs.getBytes( "UTF-8" ));

   String tileb64string = Tools.encodeBase64(tilestring.getBytes( "UTF-8" ));

   return mapb64string + ";"+tileb64string;

}



int[] rc2tile(int r,int c) {

   int[] tile2;

   int A;

   int B;

   //javax.swing.JOptionPane.showMessageDialog(null,r+" "+c);

   if ((r==1)&&(c==1)) {

      A = 0;

      B = 0;

   }

   else {

      Double r0=(Double)r;

      Double c0=(Double)c;

      int r2 = round(r0/2);

      int c2 = round(c0/2);

      tile2 = rc2tile(r2,c2);

      int tile2A = tile2[0];

      int tile2B = tile2[1];

      A = tile2B * 2 + ((r-1) % 2);

      B = tile2A * 2 + ((c-1) % 2);

            // note that the A/B switch above is intentional

   }

   return new int[] {A,B};

}



String tiles2string(String a,String b) {

   String ps="";

   String qs="";

   int p=a.length();

   int q=b.length();

   for(i=0;i<(10-p);p++)

   ps=ps+"0";

   for(i=0;i<(10-q);q++)

   qs=qs+"0";

   return ps + a + qs + b;

}



String getTileUrl( int zoom, int x, int y ) {

   return "http://m10.viamichelin.com/mapsgene/dm/mapdirect">http://m10.viamichelin.com/mapsgene/dm/mapdirect;" + urlstring(zoom,x+1,y+1);

}

__________________________