3

To open Google layer I use OpenLayers 0.93 plugin, the base layer has CRS "Dealul Piscului 1970/Stereo 70 (EPSG:31700)", the Google layer is set to "Google Mercator (EPSG:900913)".

The same base layer + google maps layer is aligned in QGIS 1.8 on Fedora and on Windows (using the same plugin version). The same problem exist in earlier versions of Ubuntu and QGIS (I have tested QGIS 1.7 on Ubuntu 10.04 and Ubuntu 11.10).

I tried to manualy change the EPSG:31700 parameters (in srs.db) to match those in the Fedora version of srs.db to:

+proj=sterea +lat_0=46 +lon_0=25 +k=0.99975 +x_0=500000 +y_0=500000 +ellps=krass +towgs84=28,-121,-77,0,0,0,0 +units=m +no_defs   

original was:

+proj=sterea +lat_0=46 +lon_0=25 +k=0.99975 +x_0=500000 +y_0=500000 +ellps=krass +units=m +no_defs  

I have installed "libgeotiff-epsg" but still no lock.

I have replaced all the *.db from /use/share/qgis/resources/*.db with ones taken from QGis 1.8 installed on Fedora, but still no lock, the layer is misaligned.

"enable on the fly reprojection" is checked.

If you need more details or have some solutions to test, please be a little more explicit because I am a beginner in GIS related things.

Edit
I attachet PrintScreen with the offset (I updated towgs84 as @mkennedy recomanded, but still no lock, only on Ubuntu):

enter image description here

1
  • I think QGIS 1.7 (on Ubuntu) should be treated as outdated. I'm not sure if it handles present or missing +towgs84 parameters the same way as Qgis 1.8.0 does.
    – AndreJ
    Commented Feb 6, 2013 at 20:31

5 Answers 5

2

Does it look like the datum transformation is occurring at all? How large is the offset? You might try these parameters instead:

X-axis translation: 44.107
Y-axis translation: -116.147
Z-axis translation: -54.648

which are listed in EPSG as 15496, Pulkovo 1942 (58) to WGS 1984 (18). Originally it was under Dealul Piscului 1970 to WGS 1984 (2), but the comment is that "Dealul Piscului 1970" didn't actually exist as a geodetic datum (coordinate reference system).

3
  • Tried EPSG:15496 doesn't work. How/where do I set those parameters ? I still think that Ubuntu's version does not do the transformation.
    – Radu Maris
    Commented Sep 11, 2012 at 12:28
  • I don't if the towgs84 parameter is read, but in the proj string: +towgs84=44.107,-116.147,-54.648,0,0,0,0
    – mkennedy
    Commented Sep 11, 2012 at 15:48
  • Tried it, didn't work :(, I updated the question.
    – Radu Maris
    Commented Sep 13, 2012 at 8:31
2

In Qgis Master, EPSG:31700 is not contained anymore. instead there is

EPSG:3844 Pulkovo 1942(58) Stereo 70

with the following proj string:

+proj=sterea +lat_0=46 +lon_0=25 +k=0.99975 +x_0=500000 +y_0=500000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs

another datum shift conversion from EPSG works with:

+towgs84=2.3287,-147.0425,-92.0802,0.3092483,-0.32482185,-0.49729934,5.68906266 

stating an accuracy of 1.5 to 3 metres horizontal, 3 to 5m vertical.

1

Try adding +wktext and/or +nadgrids=@null in your parameter string. According to http://trac.osgeo.org/proj/wiki/FAQ#ChangingEllipsoidWhycantIconvertfromWGS84toGoogleEarthVirtualGlobeMercator

2
  • Tried it, it doesn't work.
    – Radu Maris
    Commented Sep 11, 2012 at 9:40
  • 1
    You get the offset because of different +towgs84 parameters in use, even for the same EPSG-Code. Windows Version of qgis does a CRS Sync with the installed gdal at the end of the installation; maybe thats why you get no misalignement there. You can use "Gdalinfo <filename>" to see what projection information is actually stored in the raster file. If there are no towgs parameters or datum values, you can set them with gdalwarp.
    – AndreJ
    Commented Nov 11, 2012 at 20:28
1

Looking at the image, there appears to be something odd going on. In the bottom right-hand corner the project CRS is shown as EPSG:31700. If you are using OpenLayers this should be either EPSG:900913 or EPSG:3857. Perhaps you could try setting the project CRS to EPSG:3857 manually.

I've had problems recently with the OpenLayers plug-in not automatically setting the project CRS properly. Sometimes just clicking on the OpenLayer in the layers panel fixes this.

N.

5
  • 1
    I thought OL plugin now always resets the project CRS to 3857. I had some offsets until you panned the map in earlier versions of the plugin (pre-Lyon-Hackfest).
    – AndreJ
    Commented Sep 12, 2012 at 10:45
  • Thank you, I allready tried that without any luck. The strange part is that on Windows/Fedora there is no offset with the same data, only Ubuntu's version is problematic.
    – Radu Maris
    Commented Sep 12, 2012 at 10:55
  • Hum, can you share the shapefile? N.
    – nhopton
    Commented Sep 12, 2012 at 11:19
  • It's OK if I give you the SP_GEOMETRY for a few shapes (they are store in pgsql, and added as POSTGis layer) ? If you need them exported in a specific format file, please tell me how to do it in QGis (or other tools).
    – Radu Maris
    Commented Sep 13, 2012 at 8:30
  • I don't use PostGIS but with Spatialite I'd select a couple of polygons and "Save Selection As..." to a shapefile. I think this should work with PostGIS too. N.
    – nhopton
    Commented Sep 13, 2012 at 9:30
0

+towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 is the best i've encountered so far ...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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