- Messages
- 34,977
- Country

If I save my layout to .ad4, "Compile" to BGL and XML, edit the XML as necessary, "Open Airport from XML", re-save to .ad4 (with a different name to be safe), do any further edits in ADE, "Save" and "Compile" to BGL, I will have ALL of the elements that were in the original ADE .ad4 file? That is all I (and possibly others) would be interested in knowing.
"Compiling an XML source file will provide a Bgl file containing all that information." - I assume ADE "Open Airport from XML" does this?
"However if you the choose to decompile the Bgl file back to XML then the accuracy of the result will depend on the accuracy of the decompiler." - I assume that you are talking about working outside of ADE to do this.
1. When you open an airport from a bgl file then you are reliant on the accuracy of the decompiler to create 'source' data. Since MS never gave us any official information on the file format for bgl files then how faithful the decompiled information is to the original will depend on the decompiler. Since ADE has a decompiler then I cannot guarantee that what is in ADE is going to be exactly what is in the original bgl file. The same is true of any other decompiler such as BglAnalyze.
2. When you load XML into ADE it first compiles it to ensure that it is valid against the schema and then decompiles it so the caveat in point 1 above applies.
3. Once you have something in an ADE project then you can be sure that what gets compiled from that into the bgl file will faithfully match what is in ADE because we produce MS Compiler compliant XML source code.
4. There is a second set of inaccuracies that will arise if you repeatedly compile and decompile Bgl files - that is rounding errors on certain properties such as coordinates.
To answer the questions in the context of the above:
a. George points out that ADE uses several compilers. In the case of terrain and custom ground polys then these are not in the XML source you refer to so they would not be present in any recompiled Bgl file. In thje case of airport and scenery then you still have the potential inaccuracies introduced by the decompiler
b. No what I mean is that ADE generates XML source code from the project which faithfully represents the airport elements and if you compile that then you will get what you expect.
c. As mentioned above ADE makes extensive use of a decompiler so no I am talking about ADE or any other external decompiler.
On a practical level I believe that the chances of you finding a problem caused by decompiling in ADE is very small Although I cannot GUARANTEE that what you get after decompiling is exactly and totally what is in the bgl file we can say that for all practical purposes it is.


