[gdal-dev] Re: problem with unwanted white space in input file
list for gdalbuildvrt
Fabrice LALLAURET - PSV
fabrice.lallauret at external.thalesgroup.com
Fri Sep 17 10:56:55 EDT 2010
Le 09/16/2010 02:51 PM, Jukka Rahkonen a écrit :
> Fabrice LALLAURET - PSV<fabrice.lallauret<at> external.thalesgroup.com> writes:
>
>> Hi all,
>> I try to use some gdal tools in a batch file on windows and I've a
>> strange side effect. Here is a little batch use with fwtools 2.4.7.
>>
>> @echo off
>> echo "Test 1 with file list"
>> del listin.txt test1.vrt test2.vrt
>> for %%F in (krel*.tif) do @echo %%F>> listin.txt
>> gdalbuildvrt -input_file_list listin.txt test1.vrt
>> echo "Test 2 with direct argument"
>> gdalbuildvrt test2.vrt krel*.tif
> ......
>> After some investigations,(check my file, gdal debug compilation, try on
>> linux too, ...), I've found that there is a space at the end of each
>> line in my listin.txt. On linux, the same thing produce a clear error :
> I tried your batch file and my listin.txt does not have any space
> characters at the end of lines. Are you sure that your script did
> not ever have space in %%F>> ?
>
> dir /b krel*.tif>listin.txt
> gives the same result as
> for %%F in (krel*.tif) do @echo %%F>> listin.txt
>
> -Jukka Rahkonen-
>
Hi,
Thanks, my problem isn't really with my batch script, I've found my
error (%%F> listin.txt and not %%F > listin.txt) but if I put a space at
the end of each line in the filelist, I have strange error with
gdalbuildvrt ("gdalbuildvrt does not support positive NS resolution").
On linux, the same thing produce an error like "file don't exist".
Fabrice Lallauret
More information about the gdal-dev
mailing list