[Proj] Fwd: transformation wrong results from ESPG:4326 to ESPG:2100
Nikos Gerontidis
geronik444 at gmail.com
Tue Jul 27 00:37:17 PDT 2010
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20100727/4abafe99/attachment.html>
More information about the Proj
mailing list