[Proj] cs2cs and PDC Mercator

Jose Gonçalves jagoncal at gmail.com
Tue Jan 5 16:22:16 PST 2010


Hello

I think that is the expected result. The formula for the X coordinate is:
X=a*(lon-lon_0)*PI/180
where a is the semi-major axis and longitudes are in degrees. If the
result of the longitude difference is out of the interval (-180,+180)
it is reduced to this interval by adding or subtracting 360 degrees.

 -179.999999 + 150 =  -29.999999   ===>  -29.999999

+179.999999 + 150 = +329.999999   ===>  -30.000001

So the result is approximately the same (2 microdegree difference,
which corresponds to approx. 22 cm).
Probably you get the result you want by changing +lon_0 to 0 and
including the appropriate x_0 value.

Regards

José Gonçalves




2010/1/5 John Cartwright <John.C.Cartwright at noaa.gov>:
> Hello All,
>
> I'm trying to convert geographic coords (EPSG 4326) to PDC Mercator
> (EPSG 3349) and was using the command line listed below.  I was
> surprised to find that the PDC mercator X values were the same for
> -179.999999 or +179.999999.  Can someone please explain what I'm doing
> wrong?
>
> Thanks!
>
> --john
>
>
> cs2cs +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs  +to +proj=merc
> +lon_0=-150 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m
> +no_defs <<EOF
>> -179.999999 -89.999999
>> 179.999999 -89.999999
>> 179.999999 89.999999
>> -179.999999 89.999999
> EOF
>
> -3339584.61   -118315559.69 0.00
> -3339584.84     -118315559.69 0.00
> -3339584.84     118315559.73 0.00
> -3339584.61     118315559.73 0.00
>
> _______________________________________________
> Proj mailing list
> Proj at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/proj
>



More information about the Proj mailing list