[Qgis-user] Python Skript for Saving

Carlos López PSIG carlos.lopez at psig.es
Thu Sep 24 10:13:55 PDT 2015


Hi,
Yes, but It's better in list, always somebody that could correct me!!!

Firstly you must to visit this website:
http://www.gdal.org/index.html

Then, probably you need to use gdal_translate for convert rasters.

If you use windows you could write a bat for to do a list of conversions...
If you have linux you must to do a shell.

For example (bat for convert a lots of Mr Sid to TIF):

*set SRC=25831*

*REM start for*

*for /R %%f in (*.sid) do (*

*REM convert to geotif*

*call gdal_translate -a_srs EPSG:%SRC% "%%f" "%%~dpnf.tif" -co
COMPRESS=JPEG -co JPEG_QUALITY=60 -co BLOCKXSIZE=128 -co BLOCKYSIZE=128*

*REM create pyramides*

*call gdaladdo -r average --config COMPRESS_OVERVIEW JPEG --config
PHOTOMETRIC_OVERVIEW YCBCR --config INTERLEAVE_OVERVIEW PIXEL --config
JPEG_QUALITY_OVERVIEW 80 "%%~dpnf.tif" 2 4 8 16 32 64 128 256*
*)*

Good luck,


* <http://www.psig.es>*

*Carlos López Quintanilla*

www.psig.es
carlos.lopez at psig.es
+34 699.680.261



2015-09-24 19:02 GMT+02:00 "Sebastian Teßmer" <SebastianTessmer at gmx.de>:

> Hi, thanks for your answer! Can you tell me maybe a little more detail,
> how exactly I can implement that? Thank Sebastian
> --
> Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail
> gesendet.
>
>
>
> "Carlos López PSIG" <carlos.lopez at psig.es>schrieb:
>
>> Hi Sebastian,
>> You could use gdal library directly!
>>
>> Best regard,
>>
>>
>> * <http://www.psig.es> *
>>
>> *Carlos López Quintanilla*
>>
>> www.psig.es
>> carlos.lopez at psig.es
>> +34 699.680.261
>>
>>
>>
>> 2015-09-24 16:43 GMT+02:00 "Sebastian Teßmer" <SebastianTessmer at gmx.de>:
>>
>>> Hello there,
>>> I want to write a script that uses the "Save As" dialog.
>>> What is the command for this in the Python console?
>>> I want to store a lot of pictures, so they can be used offline.
>>> Perhaps there is already a script for this?
>>>
>>>
>>> Many thanks,
>>>
>>> Sebastian
>>>
>>> _______________________________________________
>>> Qgis-user mailing list
>>> Qgis-user at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>
>>
>> _______________________________________________ Qgis-user mailing list
>> Qgis-user at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20150924/fbb34b09/attachment.html>


More information about the Qgis-user mailing list