[gdal-dev] Re: Problems with transform raster image - try again !

Hermann Peifer peifer at gmx.eu
Fri Nov 25 22:27:05 EST 2011


Another option would be to gdal_translate to a .vrt by using

-a_srs srs_def EPSG:31466
-a_nodata value # in case you happen to know
-a_ullr ulx uly lrx lry # coordinates at pixel edges, not their centre 
points

Think about the .vrt as being the big brother of a world file. You might 
want to spend some time reading the documentation at [1], [2] and [3].

[1] http://www.gdal.org/gdal_translate.html
[2] http://www.gdal.org/gdal_vrttut.html
[3] http://www.gdal.org/frmt_various.html#WLD

Hermann


On 25/11/2011 11:49, Jan Tappenbeck wrote:
>
>
> HI !
>
> i try my translation in use of an other tif-source files!
>
> here even in the tif-header are informations about the reference - worst
> coordintes:
>
> C:\Program Files (x86)\FWTools2.4.7>gdalinfo
> "D:\City\raster\gas\500\g8746-1_
> cit.tif"
> Driver: GTiff/GeoTIFF
> Files: D:\City\raster\gas\500\g8746-1_cit.tif
> Size is 16215, 8904
> Coordinate System is `'
> Origin = (-948545665.889520530000000,-1021132473.110479500000000)
> Pixel Size = (3209.779041131308100,-3209.779041131308100)
> Image Structure Metadata:
> COMPRESSION=LZW
> INTERLEAVE=BAND
> Corner Coordinates:
> Upper Left (-948545665.890,-1021132473.110)
> Lower Left (-948545665.890,-1049712345.693)
> Upper Right (-896499098.738,-1021132473.110)
> Lower Right (-896499098.738,-1049712345.693)
> Center (-922522382.314,-1035422409.402)
> Band 1 Block=16215x1 Type=Byte, ColorInterp=Palette
> Color Table (RGB with 256 entries)
> 0: 255,255,255,255
>
>
> i create following twf-file manuell:
>
> 0.032098
> 0.000000
> 0.000000
> -0.032098
> 2586989.395890
> 5746263.495720
>
>
> but when i now try to translate by
>
> C:\Program Files (x86)\FWTools2.4.7>gdalwarp -s_srs EPSG:31466 -t_srs
> EPSG:25832 "D:\City\raster\gas\500\g8746-1_cit.tif"
> "D:\City\raster\gas\500\g8746-1_cit_epsg_utm.tif"
>
> i get following message:
>
> Copying color table from D:\City\raster\gas\500\g8746-1_cit.tif to new
> file.
> Creating output file that is 0P x 0L.
> ERROR 1: Attempt to create 0x0 dataset is illegal,sizes must be larger
> than zero
> .
>
> did anyone / you have a idea how to translate successfully?
>
> alternative to edit the coordinates manuell in the tif-file?
>
> it is very important for me.
>
> reagrads Jan :-)



More information about the gdal-dev mailing list