Sunday 13 January 2013

QGIS and correcting water effects

I have been spending a little time trying to get a couple of inland lakes looking like real water, rather than the flat photoscenery texture.

I have first created polygons in Google Earth around a couple of water features.  Using FSX_KML I have imported those from ESRI shapefiles into one of my SBuilderX watermasks.  So far, so good, and pretty easy.  The GE kml file is also used to generate the photoscenery and water transparency through FSEarthTiles.

However, the water transparency effects are slightly out of alignment with the watermasking produced in SBX, I think because the geo-referencing of GE and SBX is ever so slightly different.

How could I resolve this problem?  Clearly the water mask and the transparency mask polygons need to be placed in exactly the same locations with respect to each other in order for the water and transparency effects to perfectly match in FSX.   Could I amend the SBX polygons and then get the corrected polys back into GE?  If so, the photoscenery and watermasks should align correctly.

The only problem is, SBX doesn't export to kml files, but...I have found yet another very useful and free tool which does.  QuantumGIS is a fairly well featured and free GIS program.  Amongst many other things, it can import an ESRI shapefile into a vector layer and then export it as kml.

The corrected lakes now look like this in SBX.  First we do a simple export to an ESRI shapefile.


We load this shapefile into QGIS and it prompts you to input the correct coordinate reference system, which for FSX is of course WGS84.  Then we get this...



Imported into Google Earth, we then see this :)


Note that the poly outlined with a white line is my original drawn in Google Earth.  The poly outlined in red is the corrected version imported back from SBX.  With the corrected poly now part of my original kml file, I can use FSET to compile the photoscenery again and the transparency and water should perfectly align.


No comments: