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

nicolas david ericnico.david at gmail.com
Tue Jul 27 02:51:40 EST 2010


    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
> *
>
> *

perhaps you could try with "k_0" and not "k"


> **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?
>

you probably don't have the correct settings for  PROJ_LIB environnent
variable. PROJ_LIB must be the directory where the epsg file is located on
our computer. ( on which OS are you trying to compile ? windows / mac /
linux ?)
for debugging purpose you could also set PROJ_DEBUG to a more verbose mode.




> 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
>
> _______________________________________________
> 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.maptools.org/pipermail/proj/attachments/20100727/67618c7e/attachment-0001.htm 


More information about the Proj mailing list