[gdal-dev] Decimal places of output in cs2cs
Antonio Falciano
afalciano at yahoo.it
Fri Jan 17 00:22:50 PST 2014
Il 16/01/2014 22:06, ludwig.hilger ha scritto:
> hello everybody,
>
> I know that this is probably a ridiculously simple question, but I a rather
> new to the syntax and have tried this for about 2 hours now. I want to
> reproject decimal coordinates in epsg 4326 to 25832 and I want the output
> values to have three decimal places instead of 2. I have tried the following
> lines and none of them worked:
>
> set source=+proj=longlat +datum=WGS84 +no_defs
> set target=+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m
> +no_defs
>
> cs2cs %source% +to %target% < input_4326.xyz > output_25832.xyz -f "%.3f"
> cs2cs %source% +to %target% < input_4326.xyz > output_25832.xyz -f %.3f
> cs2cs %source% +to %target% < input_4326.xyz > output_25832.xyz -f '%.3f'
> cs2cs -f '%.3f' %source% +to %target% < input_4326.xyz > output_25832.xyz
> cs2cs -f %.3f %source% +to %target% < input_4326.xyz > output_25832.xyz
> cs2cs -f "%.3f" %source% +to %target% < input_4326.xyz > output_25832.xyz
>
> would be more than happy if anyone could point out my error...
Hi Ludwig,
if all these commands are in a batch file, have you tried to escape the
% sign in
the format option: -f "%%.3f"?
Cheers,
Antonio
--
Antonio Falciano
http://www.linkedin.com/in/antoniofalciano
More information about the gdal-dev
mailing list