Page 1 of 1

Adding WGS84 TIF from disk (Wrong image format error)

Posted: Sun Dec 30, 2012 4:21 pm
by Claviateur
Hi,

I got a 1.5 gig satellite image that I transformed using GDAL commands into a WGS84 format
When I resampled it manually, I saw that it is shifted few meters from my airport runways that are placed at correct coordinates so I thought using SBuilderX to reposition it a bit visualy to match my runways and also to cut it into different slices/BGLs with SBX ground photoreal process.

However when I go to place the map from disk I get an error "The Image has a wrong file format!"

I tried to convert it to a BMP (24 and 16 bit but same error)

Is it related to the size of the image or anything else?

Thanks!
Michel

Re: Adding WGS84 TIF from disk (Wrong image format error)

Posted: Sun Dec 30, 2012 4:30 pm
by luisfeliztirado
Salut Michel,

It may be due not to the image format itself, but to the projection. You converted to the datum, but the image must also have the lat-lon "geographic projection", which is not a projection at all, of course.

It is probably because you did not have this projection that the image is displaced in game.

Best regards.
Luis

Re: Adding WGS84 TIF from disk (Wrong image format error)

Posted: Sun Dec 30, 2012 7:55 pm
by Claviateur
Hi Luis

Thanks for the feedbback but not sure I underestand what you mean

Here is the gdalinfo of the original image and underneath it you can see the command line I used to mwke it datum wgs84

Code: Select all

C:\Program Files (x86)\Quantum GIS Wroclaw\bin>gdalinfo beirut.tif
Driver: GTiff/GeoTIFF
Files: beirut.tif
Size is 21533, 23788
Coordinate System is:
LOCAL_CS[" Geocoding information not available Projection Name = Stereographic (
Extended) Units = meters GeoTIFF ",
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]]]
Origin = (-343067.799999999990000,-25251.200000000001000)
Pixel Size = (0.800000000000000,-0.800000000000000)
Metadata:
  TIFFTAG_SOFTWARE=ERDAS IMAGINE
  TIFFTAG_XRESOLUTION=1
  TIFFTAG_YRESOLUTION=1
  TIFFTAG_RESOLUTIONUNIT=1 (unitless)
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  ( -343067.800,  -25251.200)
Lower Left  ( -343067.800,  -44281.600)
Upper Right ( -325841.400,  -25251.200)
Lower Right ( -325841.400,  -44281.600)
Center      ( -334454.600,  -34766.400)
Band 1 Block=64x64 Type=Byte, ColorInterp=Red
Band 2 Block=64x64 Type=Byte, ColorInterp=Green
Band 3 Block=64x64 Type=Byte, ColorInterp=Blue
Press any key to continue . . .
Gdalwarp command line:

Code: Select all

gdalwarp -of GTiff -co "INTERLEAVE=PIXEL" -s_srs "+proj=sterea +lat_0=34.2 +lon_0=39.15 +k=0.9995341 +x_0=0 +y_0=0 +a=6378249.2 +b=6356515 +units=m +no_defs" -t_srs "+proj=latlong +datum=WGS84" -r cubic beirut.tif beirut_wgs84.tif
Th

Thanks

Re: Adding WGS84 TIF from disk (Wrong image format error)

Posted: Sun Dec 30, 2012 9:26 pm
by meshman
I can say that even if the image was in the correct projection/datum it would be too big for SBuilderX to handle.

Here is a small tool that *may* help, I haven't tried it on BIG files; http://freegeographytools.com/2009/trit ... ersion-2-0

It's pretty basic is it's use. If it can load the file it will generate a Geographic/WGS84 output file. That's the format the SDKs require.

Re: Adding WGS84 TIF from disk (Wrong image format error)

Posted: Wed Jan 02, 2013 6:30 pm
by Claviateur
Thanks for the info, I croped it to the airport area and it loads OK now. Bit I am not trying to make it alligned with SBX calibration method

Cheers