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

Nikos Gerontidis geronik444 at gmail.com
Tue Jul 27 02:52:27 EST 2010


Strange..

I changed the scale factor from *"k=0.9996" to "k=0,9996"* , namely replaced
the dot with a comma value, and it is working.
I guess it could be related with the localization, which in my case is
Greek. The problem is that if there is an issue with the localization
I have to check all the other parameters that use double values..
I ll try to change the localization to US and post again.

---------- Forwarded message ----------
From: Nikos Gerontidis <geronik444 at gmail.com>
Date: Tue, Jul 27, 2010 at 10:37 AM
Subject: Fwd: [Proj] transformation wrong results from ESPG:4326 to
ESPG:2100
To: proj at lists.maptools.org


Thanks for your help

1. You were write about the number of parameters, so I changed the number to
10 and also to 11 and neither one of them worked.
    It seems that the problem is related to the scale factor, namely the
parameter *"k=0.999600". *When I am not including the scale factor in the
parameters list is working
    but of course the output coordinates are wrong.*

*2. Also the use of ESPG codes returns and error:


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

Could that be related to a missing header or library?
Thanks again.


---------- Forwarded message ----------
From: nicolas david <ericnico.david at gmail.com>
Date: Tue, Jul 27, 2010 at 10:18 AM
Subject: Re: [Proj] transformation wrong results from ESPG:4326 to ESPG:2100
To: "PROJ.4 and general Projections Discussions" <proj at lists.maptools.org>


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
>


_______________________________________________
Proj mailing list
Proj at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/proj



-- 
Best Regards
Nikos Gerontidis



-- 
Best Regards
Nikos Gerontidis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/proj/attachments/20100727/05659ed0/attachment.htm 


More information about the Proj mailing list