Mismatch transforming WGS84 to CH1903 using shp2img

Armin Burger armin.burger at GMX.NET
Fri Aug 19 13:31:22 EDT 2005


Both projections use a different geographic datum (WGS 84 and CH 1903). 
By default Mapserver based on the Proj4 engine does not perform a datum 
shift. This results in a difference between projections after 
re-projection up to some 10's meters. I don't know if with the addition 
of the -towgs84 parameter Mapserver can perform now a correct datum 
shift. Also I don't know where one could get the 3 or 7 shift parameters 
for -towgs84.

Armin

Carsten Dewey wrote:

>Dear list,
>
>the transformation from WGS84 to CH1903 Swiss Grid seems not to work
>accurately (shp2img).
>I have created a map file combining a raster image (Swiss Grid) and a
>MapInfo *.tab file (WGS84)
>The output projection is set inside the MAP object as follows:
>PROJECTION
>	"proj=somerc"
>   	"ellps=bessel"
>   	"lat_0=46.95240555555556"
>   	"lon_0=7.439583333333333"
>    	"x_0=600000"
>   	"y_0=200000"
>END
>The input projection of the tab file (LAYER object):
>PROJECTION	
>      #"proj=longlat"
>      #"ellps=WGS84"  
>END
>
>As you may see looking at the result (attached image) there is a slight
>mismatch.
>
>I've tried already to use epsg code ("init=epsg:21781") to specify the
>projection, but then I get the following error message using shp2img: 
>"msProcessProjection(): Projection library error. lat_0 = 0 or 90 or alpha =
>90"
>Using "init=world:ch1903" works fine exept from producing still a mismatch.
>
>Using cs2cs with epsg code produces the same error message.
>Transforming single points using cs2cs seems to result in mismatches as
>well.
>
>My mapserver installation includes gdaldata, gdalplugins and proj.
>All relevant paths and variables are set.
>
>Any ideas, suggestions, solutions?
>Thanks
>carsten
>
>
>  
>
>
> ------------------------------------------------------------------------
>



More information about the mapserver-users mailing list