[Proj] transformation wrong results from ESPG:4326 to ESPG:2100

nicolas david ericnico.david at gmail.com
Tue Jul 27 00:18:36 PDT 2010


Hello

1-) about your code :

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"};

if (!(pj_merc = pj_init(3,params)))
	return;

I think that "3" is a wrong argument, in your case it must be "11", the
number of argument that your params variable contains.

2-) to use EPSG code you could use pj_init_plus and the "+init" parameters.

if (! (pj_merc = pj_init_plus("+init=EPSG:2100") ) ) return ;



Nicolas DAVID

2010/7/27 Nikos Gerontidis <geronik444 at gmail.com>

>
> Hello list
>
> I want to transform coordinates from a projection with ESPG:4326 to
> a projection ESPG:2100, but some problems exist. In more details I am
> trying to
> use the proj4 library so the problem is related with function : *
> pj_transform*(..) :
>
> Here are the parameters used for ESPG:2100
>
> *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
> "
> ESPG:4326------> "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs "*
>
> Code is included inside the attached file.
>
> the projection parameters are a copy paste from PostGis.
> And another thing, is it possible to use directly the ESPG codes  inside *
> pj_transform*("Something like+ESPG:2100","ESPG:4326")
>
> Any ideas? Am I doing something wrong?
> Thanks in advance.
>
> --
> Best Regards
> Nikos Gerontidis
>
> _______________________________________________
> Proj mailing list
> Proj at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/proj
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20100727/12e1715b/attachment.html>


More information about the Proj mailing list