When I reproject a raster from Mgi 6 to WGS 84 using Warp in Quantum gis it makes mistake ( about 380m). Is there any way to avoid this?
-
1Hello, and welcome to GIS StackExchange. This is difficult to answer without more details about the original raster and the "mistake". For example, is the mistake an error message, or a problem with the output? Please edit the question to add more details, including any error messages. Thanks.– user3461Commented Mar 30, 2013 at 1:26
2 Answers
I assume you have data in EPSG:31276 MGI Balkans 6. The correct projection string is:
+proj=tmerc +lat_0=0 +lon_0=18 +k=0.9999 +x_0=6500000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs
There are some bugs in different QGIS installations which result in a projection string with only three non-zero +towgs84 parameters. With those you get a datum shift of about 300m.
Safest way is to install QGIS (on Windows) in a folder without blanks (that is not C:\Program files (x86)\Quantum GIS Lisboa
, use OSGEO4W setup, or create a custom CRS with the parameters above.
If you want to reproject with gdalwarp, you have to insert the proj string in the command line, because custom CRS inside QGIS are not supported by gdalwarp.
Maybe your problem is wrong data coordinate system. From my experience, this is often the case with MGI Balkans 6. Try this proj string
+proj=tmerc +lat_0=0 +lon_0=18 +k=0.9999 +x_0=6500000 +y_0=0 +ellps=bessel +towgs84=550.499,164.116,475.142,5.80967,2.07902,-11.62386,0.99999445824 +units=m