« Return to Thread: gdal-python packages & gdal_merge

Re: gdal_merge_mosaïc TIF

by Matt Wilkie-2 :: Rate this Message:

| View in Thread

Bonjour Fabienne,

The error "line is too long" is from CMD not gdal_merge. There are
simply too many characters in the variable %liste%. A work around is to
read the input files from a text file. E.g.

   cd /d c:\image
   dir /s/b *.tif > input-images.txt
   set opts= -co bigtiff=yes -co tfw=yes
   gdal_merge %opts% -o results.tif --optfile input-images.txt

Salut!

matt wilkie
--------------------------------------------
Geographic Information,
Information Management and Technology,
Yukon Department of Environment
10 Burns Road * Whitehorse, Yukon * Y1A 4Y9
867-667-8133 Tel * 867-393-7003 Fax
http://environmentyukon.gov.yk.ca/geomatics/
--------------------------------------------


fabienne picot wrote:

> Hi
>
> I'd like to assemble images *".TIF" which total size is 8Go, to have 1
> image which size would be the smallest possible (with the best quality
> of course!).
> - I add "@cmd.exe /V:ON" at the end of OSGEO4W.BAT to activate
> additional functionalities to create a list of files in the form of
> variables.
> - Then:
>
>     *
>
>       cd /d c:\Image
>
>     * set liste= [ ]
>     *
>     * for %c in (*.tif) do set liste=%c !liste!
>     *
>     * gdal_merge -of GTiff -co "TFW=yes" -co "BIGTIFF=yes"
>       "c:\Image\Test.tif" %liste%
>
> But the prompt answers: "THE ENTERED LINE IS TOO LONG".
>
>
> What it doesn't like?
>
> Is it the correct method to assemble and reduce image'size?
>
>
> Best regards
>
>
>
>
>
> ------------------------------------------------------------------------
> Téléphonez gratuitement à tous vos proches avec Windows Live Messenger  
> !  Téléchargez-le maintenant ! <http://www.windowslive.fr/messenger/1.asp>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> osgeo4w-dev mailing list
> osgeo4w-dev@...
> http://lists.osgeo.org/mailman/listinfo/osgeo4w-dev

_______________________________________________
osgeo4w-dev mailing list
osgeo4w-dev@...
http://lists.osgeo.org/mailman/listinfo/osgeo4w-dev

 « Return to Thread: gdal-python packages & gdal_merge