S-JTSK to S42

Aug 4, 2009 at 12:49 PM

Hallo,
I'm trying to convert some coordinates from S-JTSK (Krovak) to S42 (Gauss-Krueger, 1942 Polakov) in c# program. I found some WKT definitions for both projections. It looks like this:

//4818;GEOGCS[\"S-JTSK (Ferro)\",DATUM[\"S_JTSK_Ferro\",SPHEROID[\"Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],AUTHORITY[\"EPSG\",\"6818\"]],PRIMEM[\"Ferro\",-17.66666666666667,AUTHORITY[\"EPSG\",\"8909\"]],UNIT[\"degree\",0.01745329251994328,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4818\"]]
//(3) GEOGCS[\"Pulkovo 1942(83)\",DATUM[\"Pulkovo_1942_83\",SPHEROID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[24,-123,-94,0.02,-0.25,-0.13,1.1],AUTHORITY[\"EPSG\",\"6178\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994328,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4178\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",9],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",3500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AUTHORITY[\"EPSG\",\"2166\"]

When I enter point that has x,y :
-383142.0625 -1164266.0
and after conversion it gives me 3 values:
-102.06303800133298 -25.999204864490316 -895.82493977434933

but other data I've got in S42 look more like  3808256  5417504 (it doesn't represent the same point as in previous example, but it is from the same area - at least it is in Slovakia). I know the third value should be altitude, but I don't know how to get coordinates in the form: XXXXXXX YYYYYYY (returned from the ProjNet were xxx.xxx yy.yyy)
If anybody dealed with conversions between s42(Gauss-Kruger) and S-JTSK(Krovak), please help. I'm trying to convert it for ages with no success. I'm not a geo-expert, so please, if anybody has a clue, write it in a "HowTo for dummy" form ;-)

Thanx