[OSRS-PROJ] problems with ' and " in coordinates?

Frank Warmerdam warmerdam at pobox.com
Fri Apr 19 12:24:12 EDT 2002

Agustin Lobo wrote:
> Hi!
> I'm using PROJ to transform from lcc to lon,lat
> and I'm confused by the following:
> If I use:
> proj -I +proj=lcc +a=6378388.0000000000 +es=0.0067226700 +lat_0=40.0
> +lat_1=37.1780716667 +lat_2=42.8219283333 +lon_0=-3.687500  +x_0=600000.0
> +y_0=600000.0 +unfact=1.0000000000 <<EOF
>>600000 600000
> I get the correct result:
> 3d41'15"W       40dN
> But if I use ' and " for the coordinates (i.e.,+lat_1=37d10'41.058"
> instead
> of +lat_1=37.1780716667 ), I get a wrong result:
> proj -I +ellps=intl +proj=lcc +x_0=600000  +y_0=600000
> +lat_1=37d10'41.058"  +lat_2=42d49'18.9420"  +lon_0=-3d41'15"  +lat_0=40d
> <<EOF


This is a shell escaping problem.  The single and double quotes have special
meaning to the various shells so you have to put a special "escape" character
in front of them.

eg. +lat_1=37d10\'41.058\"

This is out of the control of proj, and occures before proj gets the argument

Best regards,
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

PROJ.4 Discussion List
See http://www.remotesensing.org/proj for subscription, unsubscription
and other information.

More information about the Proj mailing list