Inserting Raster Image with TFW file
I'm inserting geographical raster files into BricsCad V9 and use a TFW file to position the image in Modelspace.TFW format:XpixelSize00-YpixelSizeE upperleftN upperleftSo far so good.Now I also want to insert a rotated image.As it comes to the definition of the first four lines of the TFW file, the internet is full of different explainations on how the put the rotation in there.Must be some kind of rotation matrix I realise.I've been playing with different formats but BricsCad seems to ignore the rotation.Can anybody explain me the working format of the TFW file for rotated images? TIA,Arno van EeuwenThe Netherlands
Comments
-
Hello Arno,for ECW and Jpeg2000 images, the rotation specified in position files is taken into account. For TFW files not yet, in fact because like you, we could not find a good description of the format. We will search a bit harder and try to find out. Any help is welcome...Kind regards.
0 -
Some years ago I implemented a utility "Insert Image using 'World File' ...So I checked ESRI's documentation about the "World File Format" - and there is indeed an exact definition.Later, we had to realise, that MOST major applications (Acad MAP, MAP Guide at those times, and others from other companies) do ALL their own interpretation of a given World File ... in result, our own code, which was & is indeed correct, produced different results than those other CAD systems ...We were claimed to work wrong ... so we analysed thoise other CAD systmes how they use "World Files" ...Mainly we did these tests :read + write the image + related world file for- ortho images without rotation/distortion- ortho image with rotation + without distortion- ortho image with rotation + with distortionThen, we reloaded these images using the same, just-written, world file ... and no image at all was located at the same location anymore ...Meaning, during read+write of World Files these CAD systems even used different logic, not only a wrong logic during Image read-in.Only in easiest cae, no rotation, no distortion, all CAD systems were able to load, write, reload image + world file without difference; if at least rotation was present, the results were no longer reliable.At the end, we did not find any CAD system (except ESRIs packages of course, and our own utility) that worked correctly with World Files.This result was shocking !So until you exactly know that a World File comes from ESRI, you should be extremely sceptical about the image after read-in - simply, because the World File might be wrong.The only case, were it should not be critical, are ortho images with location only, without rotation and without distortion ...I think, I will provide my documentation and code to Bricsys ...Many greetings to all
0 -
Thanks for your swift reply.So I'm not the only one puzzled on this one!Maybe Bricscad can adopt and document a format and set that as THEIR TFW rotated file format? (Then at least one format is working)For the time being I'll stick to unrotated images.Cheers,Arno
0