I think you need to add the right towgs84 parameters to your projection definition.
For Dutch national grid I use (I added the towgs84 params): Proj4js.defs["EPSG:28992"] = "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +units=m +towgs84=565.2369,50.0087,465.658,-0.406857330322398,0.350732676542563,-1.8703473836068,4.0812 +no_defs "; Google [1] or check the EPSG database for the right towgs84 settings for your projection. [1] http://osdir.com/ml/gis.geotools2.user/2006-12/msg00069.html Best regards, Bart > > Hi, > > it seems to work. > But e.g. converting from 4326 to 31466 is very naccurately > <http://dict.leo.org/ende?lp=ende&p=5tY9AA&search=inaccurately> > naccurately. > There a difference of 10-100 meters!! > ?????????????????? > > Greetings > > Byte > > > Tobias Wendorff (via Nabble) schrieb: >> Bytechanger schrieb: >> > MsgBox shows source coordinates .... no convert! >> >> Download proj4js and include it: >> >> <script type="text/javascript" src="../proj4js/lib/proj4js.js"></script> >> <script type="text/javascript" >> src="../proj4js/lib/projCode/merc.js"></script> >> <script type="text/javascript" >> src="../proj4js/lib/projCode/tmerc.js"></script> >> >> Then define everthing: >> Proj4js.defs['EPSG:4326'] = '+proj=longlat +ellps=WGS84 +datum=WGS84 >> +nadgri...@null +no_defs'; >> >> Proj4js.defs['EPSG:900913']= '+proj=merc +a=6378137 +b=6378137 >> +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgri...@null >> +no_defs'; >> >> Proj4js.defs['EPSG:31466'] = '+proj=tmerc +lat_0=0 +lon_0=6 +k=1.000000 >> +x_0=2500000 +y_0=0 +ellps=bessel +units=m +nadgri...@null +no_defs'; >> >> Okay, you don't need 909913 and merc, I think ... but I like to >> have control about these settings. >> >> _______________________________________________ >> Users mailing list >> [hidden email] >> <http://n2.nabble.com/user/SendEmail.jtp?type=node&node=3788136&i=0> >> http://openlayers.org/mailman/listinfo/users >> >> >> ------------------------------------------------------------------------ >> View message @ >> http://n2.nabble.com/Convert-Coordinates-EPSG-4326-to-31466-doesn-t-work-tp3787906p3788136.html >> >> To unsubscribe from Convert Coordinates EPSG:4326 to 31466 doesn?t >> work ??, click here >> < (link removed) =>. >> >> > > > -- > View this message in context: > http://n2.nabble.com/Convert-Coordinates-EPSG-4326-to-31466-doesn-t-work-tp3787906p3793412.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > [email protected] > http://openlayers.org/mailman/listinfo/users > _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
