Adding WGS84 TIF from disk (Wrong image format error)

This is the Forum to discuss the use of SBuilderX (version 3.10 and above). For previous versions of SBuilder please use the "SBuilder for Flight Simulator FS2004" forum.
Post Reply
Claviateur
Posts: 18
Joined: Sat Mar 28, 2009 7:39 pm

Adding WGS84 TIF from disk (Wrong image format error)

Post by Claviateur » Sun Dec 30, 2012 4:21 pm

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

User avatar
luisfeliztirado
Posts: 436
Joined: Sun May 15, 2005 9:15 am
Location: Santo Domingo

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

Post by luisfeliztirado » Sun Dec 30, 2012 4:30 pm

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

Claviateur
Posts: 18
Joined: Sat Mar 28, 2009 7:39 pm

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

Post by Claviateur » Sun Dec 30, 2012 7:55 pm

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

meshman
Posts: 219
Joined: Sun Jan 01, 2006 11:54 pm

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

Post by meshman » Sun Dec 30, 2012 9:26 pm

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.
Lance

Claviateur
Posts: 18
Joined: Sat Mar 28, 2009 7:39 pm

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

Post by Claviateur » Wed Jan 02, 2013 6:30 pm

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

Post Reply