[Qgis-user] qgis-gdal: color-table problem to transform rasterimge

Etienne Tourigny etourigny.dev at gmail.com
Wed Jun 20 07:34:24 PDT 2012


On Wed, Jun 20, 2012 at 11:19 AM, Jan Tappenbeck <osm at tappenbeck.net> wrote:
> hi !
>
> i have to transform rasterimages from gauss-krueger to etrs by using
> gsb-files.
>
> one of the image is:
>
> Driver: GTiff/GeoTIFF
> Files: C:/Users/tappenbeck/Desktop/Haan_Transformation/BP_001.tif
>       C:/Users/tappenbeck/Desktop/Haan_Transformation/BP_001.tfw
> Size is 1862, 2990
> Coordinate System is `'
> Origin = (2570979.517376476900000,5673843.182623745900000)
> Pixel Size = (0.085247046186886,-0.085247491638684)
> Metadata:
>  TIFFTAG_SOFTWARE=IrfanView
>  TIFFTAG_XRESOLUTION=200
>  TIFFTAG_YRESOLUTION=200
>  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
> Image Structure Metadata:
>  COMPRESSION=PACKBITS
>  INTERLEAVE=BAND
> Corner Coordinates:
> Upper Left  ( 2570979.517, 5673843.183)
> Lower Left  ( 2570979.517, 5673588.293)
> Upper Right ( 2571138.247, 5673843.183)
> Lower Right ( 2571138.247, 5673588.293)
> Center      ( 2571058.882, 5673715.738)
> Band 1 Block=1862x4 Type=Byte, ColorInterp=Palette
>  Color Table (RGB with 256 entries)
>    0: 0,0,0,255
>    1: 255,255,255,255
>    2: 251,243,215,255
>    3: 251,238,211,255
>    4: 251,238,206,255
> ....
>  254: 227,230,230,255
>  255: 255,255,255,255
>
> i want to use a gdal-statement by sven geggenus [1] for transformation. i
> open the gdal-function gdal > transformation (projection) and i copy the
> modify source in the command area at the buttom of the dialog:
>
>
> gdalwarp -r cubicspline -multi -of HFA -s_srs "+init=epsg:31466
> +nadgrids=C:/Users/Tappenbeck/Desktop/Haan_Transformation/Mettmann_Beta2007.gsb
> +wktext" -t_srs EPSG:25832 -of GTiff
> C:/Users/tappenbeck/Desktop/Haan_Transformation/BP_001.tif
> C:/Users/tappenbeck/Desktop/Haan_Transformation/BP_001_trans.tif
>
> after apply the command i get following message:
>
> Output dataset
> C:/Users/tappenbeck/Desktop/Haan_Transformation/BP_001_trans.tif exists,
> but some commandline options were provided indicating a new dataset
> should be created. Please delete existing dataset and run again.
>
> can anyone help me to do the transformation ?

follow the recommendation, either delete the dataset before running
the gdalwarp command, or use the -overwrite option.

>
> ADDITITION:
> it is only possible to modify the gdad-command for single use - file by
> file.
>
> is it possible to use usermodifiy-command for folder-transformations ?

In linux you would use a bash script that loops over all the files in
the directory, there are plenty of examples in the archives of this
mailing list and elsewhere.  I can't help you do this on windows
though.

>
> please help.
>
> reagards Jan :-)
>
>
>
>
> [1]
> http://www.fossgis.de/konferenz/2010/attachments/71_osm-datenaufbereitung-fossgis-2010.pdf
> - Page 8
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user



More information about the Qgis-user mailing list