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

Nikos Gerontidis geronik444 at gmail.com
Tue Jul 27 01:34:17 PDT 2010


Ops, thanks Nicolas, rtfm could also be included in your answer. I should
have red better the manual.


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




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

> I changed the localization and a solution is found, but is it possible that
> proj4 could have an issue with the localization?
>

yes, it's on the documentation :
http://trac.osgeo.org/proj/wiki/FAQ#DoesPROJ.4workindifferentinternationalnumericlocales

To be more specific a double number for Greek locale uses comma values to
> separate the decimal value while others use the dot e.g.
> Greek : 0,1
> Us      : 0.1
>
>
> same in french, we use comma


> About the environment variables I am using Gnu Mandriva Linux 32bit
> distribution, so I ll try to add the variable to the PATH.
>

just before launching your programm on the command line try :

export LC_NUMERIC=C # for local setting
export PROJ_LIB="your/path/to/proj4/nad/files"
export PROJ_DEBUG=1


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


_______________________________________________
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/76ad37b6/attachment.html>


More information about the Proj mailing list