Ok..<div><br></div><div>I already had the proj4js, but I was trying to transform to 4230, and the result was not what I expected.</div><div>Now i'm using the 4668 and it seems to be ok!<br><br></div><div>Thanks a lot!</div>
<div><br><div class="gmail_quote">2011/2/11 Andreas Hocevar <span dir="ltr"><<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br>
<br>
if you want to do this on the client, you will need proj4js (<a href="http://proj4js.org" target="_blank">http://proj4js.org</a>). To use it, add the following to your html page:<br>
<br>
<script type="text/javascript" src="<a href="http://proj4js.org/lib/proj4js-compressed.js" target="_blank">http://proj4js.org/lib/proj4js-compressed.js</a>></script><br>
<script type="text/javascript"><br>
Proj4js.defs["EPSG:4230"] = "+proj=longlat +ellps=intl +no_defs";<br>
Proj4js.defs["EPSG:4668"] = "+proj=longlat +ellps=intl +towgs84=-86,-98,-119,0,0,0,0 +no_defs";<br>
</script><br>
<br>
The EPSG code for ED50 is EPSG:4230, and for ED79 it is EPSG:4668. As you can see in the above definition, you won't have much luck with ED50, because the EPSG database does not have transformation parameters. For ED79, however, we can at least do a 3-parameter transformation.<br>
<br>
Now to convert a point from EPSG:900913 to ED79, you would do exactly as if you'd convert to WGS84, but use "EPSG:4668" instead of "EPSG:4326" as EPSG code.<br>
<br>
Note that you can find all available EPSG codes at <a href="http://spatialreference.org/" target="_blank">http://spatialreference.org/</a>.<br>
<br>
Regards,<br>
Andreas.<br>
<div><div></div><div class="h5"><br>
On Feb 11, 2011, at 13:00 , jkm wrote:<br>
<br>
> Hi,<br>
><br>
> I would like to know if is there any way to change the datum of a point..<br>
><br>
> I'm working with a google maps base layer, and it returns the coordinates in EPSG:900913 and I transform them to WGS84. But what I would like, is to get lat/lon, in european79 or european50.<br>
><br>
> I've seen in proj4js that there is a datum_transform function.. But it doesn't seem to transform the coordinates' datum..<br>
><br>
> I'm in the right way? or what is supposed to do in that case?<br>
><br>
> Thanks!<br>
><br>
><br>
</div></div>> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
<font color="#888888"><br>
<br>
<br>
--<br>
Andreas Hocevar<br>
OpenGeo - <a href="http://opengeo.org/" target="_blank">http://opengeo.org/</a><br>
Expert service straight from the developers.<br>
<br>
</font></blockquote></div><br></div>