<HTML dir=ltr><HEAD><TITLE>[Gvsig_english] reproject swiss epsg 21781 to wgs84 with gvsig</TITLE>
<META content="text/html; charset=unicode" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18372"></HEAD>
<BODY>
<DIV dir=ltr id=idOWAReplyText24678>
<DIV dir=ltr><FONT color=#000000 size=3 face="Times New Roman">Hello, Bernie:</FONT></DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr>According to this message, the grid chenxy06.gsb does not take you from EPSG:21781 to EPSG:4326. It takes you from the CH1903 datum to the CH1903+ datum:</DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr><A href="http://lists.maptools.org/pipermail/proj/2009-January/004296.html">http://lists.maptools.org/pipermail/proj/2009-January/004296.html</A></DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr>Some weeks ago, I read something about this issue and somebody proposed to use 89.99999999 instead of 90, but you have used 89.9 which maybe is not close enough to 90. I don't have gvSIG 1.9 now, I'll do some other test tomorrow.</DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr>Regards,</DIV>
<DIV dir=ltr><FONT color=#000000 size=3 face="Times New Roman"></FONT> </DIV></DIV>
<DIV dir=ltr id=idSignature10972>
<DIV><FONT size=2 face="Courier New"><FONT size=3 face="Times New Roman">Juan Lucas Domínguez Rubio<BR></FONT>---</FONT></DIV>
<DIV><FONT size=2 face="Courier New"><FONT size=2 face="Courier New"><FONT size=2 face="Courier New">Prodevelop SL, Valencia (España)</FONT></DIV>
<DIV>
<DIV><FONT size=2 face="Courier New">Tlf.: 96.351.06.12 -- Fax: 96.351.09.68<BR></FONT><A href="http://www.prodevelop.es/"><FONT size=2 face="Courier New">http://www.prodevelop.es</FONT></A><BR><FONT size=2 face="Courier New">---</FONT></DIV></FONT></DIV></FONT></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>De:</B> gvsig_internacional-bounces@listserv.gva.es en nombre de Bernhard Draeyer<BR><B>Enviado el:</B> mié 16/12/2009 11:24<BR><B>Para:</B> gvsig_internacional@listserv.gva.es<BR><B>Asunto:</B> [Gvsig_english] reproject swiss epsg 21781 to wgs84 with gvsig<BR></FONT><BR></DIV>
<DIV><BR>
<P><FONT size=2>hello<BR><BR>i try to reproject a shp-layer with the swiss epsg 21781 coordinate system to the epsg 4326 (wgs84) system. unfortunately the geometry is displayed some 200 m northeast from where it should be. i couldn't find out so far if the transformation doesn't work properly or if i do some wrong manipulation. this is how i proceeded so far:<BR><BR>1. create a user crs from a copy of the 21781 projected swiss grid. set azimuth from 90 to 89.9 and rectified height to 89.9 (since the original 21781 gives an error, when these params are set to 90).<BR><BR>2. open a view and apply the user crs to it.<BR><BR>3. add the shp-file to the layer. it displays with correct swiss coordinates.<BR><BR>4. open the geoprocess manager and select reproject. source prj is my user crs. target prj is epsg 4326 wgs84. there exists no epsg transformation in the table so the transformation was done by grids->chenxy06.gsb (which can be downloaded from the webpage of the swiss federal office of topography). a layer "..wgs84" is added to the view.<BR><BR>5. export the "..wgs84" layer as shp.<BR><BR>6. import the "..wgs84" shp in a new view with epsg4326 set as view crs. (could't figure out if i could do this step without exporting and importing the shp).<BR><BR>7. the new shp is displayed about 200 m to the northeast, where it should be. how do i know? because transformations with other tools give me correct results. for example the same shp transformed with arc map displays correct. also the transformation with ogr2ogr from fwtools works fine.<BR><BR>so where is the error?<BR>A) i do not use correctly the geoprocess manager.<BR>B) there is some transformation problem with the swiss coordinate system.<BR><BR>what looks strange to me:<BR><BR>fwtools uses the same gdal library as gvsig, right? so i compared some files. it seems, that the crs definitions are stored in the gcs.csv and pcs.csv files. these files in the gvsig folder are older, than the ones in the fwtools folder. in addition there exists a gcs.overrdide.csv in the fwtools with a replacement line for the 4149 CH1903 definition, which is referenced for the epsg 21781. it reads:<BR><BR>4149,CH1903,6149,CH1903,6149,9122,7004,8901,1,0,9603,674.374,15.056,405.346,,,,<BR><BR>compared to the line with gvsig:<BR><BR>4149,CH1903,6149,9122,7004,8901,1,0,,,,,,,,<BR><BR>so i replaced the epsg 4149 line in the gcs.csv from gvsig and also replaced the azimuth value from 90 to 89.9 in the epsg21781 line.<BR>-> there is no difference when reprojecting<BR><BR>->>> this let me assume, that probably gvsig doesn't use the gcs.csv and pcs.csv files on startup but uses perhaps a seperate database.<BR><BR>in this case, is the database accessible for changing entries or can it be forced to (re-?) read the csv.<BR><BR>now i'm out of ideas ... somebody here to help cracking the mystery or who had similar problems?<BR><BR>many thanks<BR><BR>bernie<BR><BR> <BR>_________________________________________________________________<BR>Windows Live: Make it easier for your friends to see what you’re up to on Facebook.<BR><A href="http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_2:092009">http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_2:092009</A><BR>_______________________________________________<BR>Gvsig_internacional mailing list<BR>Gvsig_internacional@listserv.gva.es<BR><A href="http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional">http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional</A><BR></FONT></P></DIV></BODY></HTML>