[Gvsig_english] reproject swiss epsg 21781 to wgs84 with gvsig
Juan Lucas Dominguez Rubio
jldominguez at prodevelop.es
Thu Dec 17 00:21:15 CET 2009
Hello, Bernie:
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:
http://lists.maptools.org/pipermail/proj/2009-January/004296.html
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.
Regards,
Juan Lucas Domínguez Rubio
---
Prodevelop SL, Valencia (España)
Tlf.: 96.351.06.12 -- Fax: 96.351.09.68
http://www.prodevelop.es <http://www.prodevelop.es/>
---
________________________________
De: gvsig_internacional-bounces at listserv.gva.es en nombre de Bernhard Draeyer
Enviado el: mié 16/12/2009 11:24
Para: gvsig_internacional at listserv.gva.es
Asunto: [Gvsig_english] reproject swiss epsg 21781 to wgs84 with gvsig
hello
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:
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).
2. open a view and apply the user crs to it.
3. add the shp-file to the layer. it displays with correct swiss coordinates.
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.
5. export the "..wgs84" layer as shp.
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).
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.
so where is the error?
A) i do not use correctly the geoprocess manager.
B) there is some transformation problem with the swiss coordinate system.
what looks strange to me:
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:
4149,CH1903,6149,CH1903,6149,9122,7004,8901,1,0,9603,674.374,15.056,405.346,,,,
compared to the line with gvsig:
4149,CH1903,6149,9122,7004,8901,1,0,,,,,,,,
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.
-> there is no difference when reprojecting
->>> 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.
in this case, is the database accessible for changing entries or can it be forced to (re-?) read the csv.
now i'm out of ideas ... somebody here to help cracking the mystery or who had similar problems?
many thanks
bernie
_________________________________________________________________
Windows Live: Make it easier for your friends to see what you're up to on Facebook.
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
_______________________________________________
Gvsig_internacional mailing list
Gvsig_internacional at listserv.gva.es
http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserv.gva.es/pipermail/gvsig_internacional/attachments/20091217/77786ac7/attachment.htm
More information about the Gvsig_internacional
mailing list