I’ve been working with River Simulation results recently. The simulation results look good colored by the various variables, but they look 10x better when you use aerial photos overlaid on the simulation. This gives a great perspective and context to the simulation, as well as providing the viewer with a lot more spatial information. It is a great combination of simulation and real map. The crux of this problem is the accurate alignment of the photo with the simulation results. Lucky, most high end/bespoke aerial photos have some type of Global Positioning, or World File information with them. This provides some spatial reference information which can be combined with the simulation space to align the two pieces of information.
In the models and images I looked at this week, the images had “World Files” associated with them. These world files provide the scaling, rotation, and transformation information to map the pixels of the image into 2D space. So, I wrote a small little python tool as an example of being able to accurately align the image with the simulation results using these “World Files”. The python file opens up the image file to figure out its pixel dimensions, and then opens the World File to extract out the scaling & transformation information (I’ve left rotation out of the mix for the moment). With this information, I can then correctly specify the S and T projection vectors as well as the Offset information in the texture map dialog to automatically project the image onto the geometry in the correct 2D space. I also included an option for relative vs. absolute coordinates of the simulation model, so that you can easily account for that difference in the World File.
The Python tool and window are as follows:
This provides a nice enhancement to the texture map capability in EnSight, to exactly align the image with the geometry when this information is known (via World File).
If users utilize other conventions for alignment of the Aerial Photo with the geometry, please feel free to contact us, as the power of python programming should allow alternative methods.
To install this python, copy the link below, and place into your ~/.ensight92/extensions/user_defined/Tools/ directory (or subdirectory), and re-launch EnSight.