Hello<br><br>1-) about your code :<br><pre>char *params[] = { "proj=merc", "lat_0=0", "lon_0=24", "k=0.999600", "x_0=500000", "y_0=0", "ellps=GRS80", "towgs84=-199.87,74.79,246.62,0,0,0,0", "units=m", "no_defs"};<br>
<br>if (!(pj_merc = pj_init(3,params)))<br>        return;<br></pre>I think that "3" is a wrong argument, in your case it must be "11", the number of argument that your params variable contains.<br><br>2-) to use EPSG code you could use pj_init_plus and the "+init" parameters. <br>
<br><font style="font-family: georgia,serif;" size="2">if (! (pj_merc = pj_init_plus("+init=EPSG:2100") ) ) return ;</font><br><br><br><br>Nicolas DAVID<br><br><div class="gmail_quote">2010/7/27 Nikos Gerontidis <span dir="ltr"><<a href="mailto:geronik444@gmail.com">geronik444@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br clear="all">Hello list<br><br>I want to transform coordinates from a projection with ESPG:4326 to <br>
a projection ESPG:2100, but some problems exist. In more details I am trying to <br>use the proj4 library so the problem is related with function : <i><b>pj_transform</b></i>(..) :<br>
<br>Here are the parameters used for ESPG:2100<br><br><i>ESPG: 2100-----> "+proj=tmerc +lat_0=0 +lon_0=24 +k=0.999600 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=-199.87,74.79,246.62,0,0,0,0 +units=m +no_defs "<br>
ESPG:4326------> "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs "</i><br><br>Code is included inside the attached file.<br><br>the projection parameters are a copy paste from PostGis.<br>And another thing, is it possible to use directly the ESPG codes inside <i><b>pj_transform</b></i>("Something like+ESPG:2100","ESPG:4326")<br>
<br>Any ideas? Am I doing something wrong?<br>Thanks in advance.<br><br>-- <br>Best Regards<br><font color="#888888">Nikos Gerontidis<br>
</font><br>_______________________________________________<br>
Proj mailing list<br>
<a href="mailto:Proj@lists.maptools.org">Proj@lists.maptools.org</a><br>
<a href="http://lists.maptools.org/mailman/listinfo/proj" target="_blank">http://lists.maptools.org/mailman/listinfo/proj</a><br></blockquote></div><br>