2

I'm developing an app which should show a map using Leaflet framework but i have no luck as the coordinate system on the map server differs from the one used by Leaflet.

  1. As a map server i use Arcgis which is accessed by means of REST interface
  2. The coordinate system used by the server is GCS_Bessel_1841. WKT definition: GEOGCS["GCS_Bessel_1841",DATUM["D_Bessel_1841",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",37.5],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",55.66666666666666],UNIT["Meter",1.0]

  3. I use proj.4 to convert GCS_Bessel_1841 to WGS84 (used by leaflet) but can't figure out how to make a correct definition especially how to write +towgs84.

The question is how to figure out the values for DX,DY,DZ,RX,RY,RZ.

The afterall my proj.4 defitiion looks like: +proj=tmerc +lon_0=37.5 +lat_0=55.66666666666666 +ellps=bessel +towgs84=0,0,0,0,0,0,0 +a=6377397.155 +b=6356078.962818188 +pm=greenwich +k_0=1 +x_0=0 +y_0=0 +units=m +no_defs

The Leaflet code:

`var crs = new L.Proj.CRS('EPSG:3857', '+proj=tmerc +lat_0=55.66666666666666 +lon_0=37.5 +k=1 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs', { origin: [-5622500.0, 3830200.0], resolutions: [ 305.74811314055756, 152.87405657041106, 76.43702828507324, 38.21851414253662, 19.10925707126831, 9.554628535634155, 4.77731426794937, 2.388657133974685, 1.1943285668550503, 0.5971642835598172, 0.29858214164761665, 0.14929107082380833 ] });

var map = new L.Map('map', { crs: crs });

var tileUrl = 'http://egip.mka.mos.ru/arcgis/rest/services/osnova_wgs_cached/MapServer/tile/{z}/{y}/{x}', attrib = '© 2012', tilelayer = new L.TileLayer(tileUrl, { maxZoom: 12, minZoom: 0, continuousWorld: true, attribution: attrib, });

map.addLayer(tilelayer); map.setView([ 55.750984, 37.617571], 0);

map.on('mousemove', onMapMouseMove);' `

7
  • Please double-check the WKT definition. I guess it should start with PROJCS["...
    – Hermann
    Sep 22, 2013 at 9:54
  • 1
    Yes, it does. But how can that help me to make a correct to towgs84? The full WKT: 'PROJCS["Moscow_bessel",GEOGCS["GCS_Bessel_1841",DATUM["D_Bessel_1841",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",37.5],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",55.66666666666666],UNIT["Meter",1.0]]'
    – alex
    Sep 22, 2013 at 10:40
  • You could save the full WKT as a file, say Moscow_bessel.prj and run gdalsrsinfo, which will return the PROJ.4 notation (among other info): gdalsrsinfo Moscow_bessel.prj PROJ.4 : '+proj=tmerc +lat_0=0 +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=bessel +to_meter=0 +no_defs '
    – Hermann
    Sep 22, 2013 at 10:58
  • Please ignore the above comment. Something went wrong when copying & pasting.
    – Hermann
    Sep 22, 2013 at 11:03
  • gdalsrsinfo returns for the given WKT: PROJ.4 : '+proj=tmerc +lat_0=55.66666666666666 +lon_0=37.5 +k=1 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs '
    – Hermann
    Sep 22, 2013 at 11:10

1 Answer 1

2

This is how QGIS writes the proj-string and WKT with +towgs84-parameter:

+proj=longlat +ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.455,6.7 +no_defs

GEOGCS["DHDN",DATUM["Deutsches_Hauptdreiecksnetz",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[598.1,73.7,418.2,0.202,0.045,-2.455,6.7],AUTHORITY["EPSG","6314"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4314"]]

But keep in mind that there is no overall value for converting any Bessel-1841-Data to WGS84.

For Germany, there were a lot of parametres published, until a NADgrid for the whole country was created. This applies the correct shift for every point inside Germany.

Other surveying authorities have done similar conversions, but with other values.


EDIT

There is a forum entry in Russian http://gis-lab.info/forum/viewtopic.php?t=9386

giving the following proj parameters:

+proj=tmerc +lat_0=55.6666666667 +lon_0=37.5 +x_0=0 +y_0=0 +k_0=1. +a=6377397 +rf=299.15 +towgs84=396,165,557.7,-0.05,0.04,0.01,0 +no_defs

Maybe you get lucky with those values.

2
  • The initial question mentions the projection parameter ["Central_Meridian",37.5], which isn't very far away from Moscow. Using towgs84 parameter values from Germany will not make much sense out there.
    – Hermann
    Sep 23, 2013 at 9:05
  • I know that, I just wanted to point out how the towgs84 parametre can be given in WKT.
    – AndreJ
    Sep 23, 2013 at 10:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.