Building lib objects error

#1
Jon,

I import an XML file and the validate says I have a problem with a genericbuilding object.

The file has:

<!--Generic Building 1 -->
<SceneryObject
lat = "35.0244269444444"
lon = "-110.725890277778"
alt = "0.0"
altitudeIsAgl = "TRUE"
pitch = "0.0"
bank = "0.0"
heading = "30.0"
imageComplexity = "SPARSE">
<GenericBuilding
scale = "1.0"
bottomTexture = "8"
roofTexture = "8"
topTexture = "8"
windowTexture = "8">
<RectangularBuilding <---- has line
roofType = "PEAKED"
sizeX = "100"
sizeZ = "200"
sizeBottomY = "10"
textureIndexBottomX = "256"
textureIndexBottomZ = "256"
sizeWindowY = "20"
textureIndexWindowX = "256"
textureIndexWindowY = "256"
textureIndexWindowZ = "256"
sizeTopY = "10"
textureIndexTopX = "256"
textureIndexTopZ = "256"
textureIndexRoofX = "256"
textureIndexRoofZ = "256"
sizeRoofY = "10"
textureIndexRoofY = "256"/>
</GenericBuilding>
</SceneryObject>


It displays:

<SceneryObject
lat="35.0244269444444"
lon="-110.725890277778"
alt="0.0M"
altitudeIsAgl="TRUE"
pitch="0"
bank="0"
heading="30"
imageComplexity="SPARSE">
<GenericBuilding
scale="1"
bottomTexture="8"
roofTexture="8"
topTexture="8"
windowTexture="8">
roofType="PEAKED" <--- missing line
sizeX="100"
sizeZ="200"
sizeBottomY="10"
textureIndexBottomX="256"
textureIndexBottomZ="256"
sizeWindowY="20"
textureIndexWindowX="256"
textureIndexWindowY="256"
textureIndexWindowZ="256"
sizeTopY="10"
textureIndexTopX="256"
textureIndexTopZ="256"
textureIndexRoofX="256"
textureIndexRoofZ="256"
sizeRoofY="10"
textureIndexRoofY="256"/>
</GenericBuilding>
</SceneryObject>

Second the winsock has blanks in the tree view for polecolor and sockcolor.
 
Last edited:

scruffyduck

Administrator
Staff member
FSDevConf team
Resource contributor
#2
Thanks Ron,

I know there are one or two unfixed problems in Generic Buildings which I need to sort out but I was not aware that there are problems with Windsocks.
 
#3
Jon,

I was working on a way to show the xml graphically and remembered SceneGenX. I see you have a work directory where a temp.xml is. SO I tried the example file in SGX and tried to import to SDE. I found that lines with MDL - cause SDE to show an error. Removed those. It then stoped at runway data and found that ILS was cause SDE to stop.

SGX would be a good way to "view" your SDE XML data. Does anyone know if Tom H will update SGX?

Can't wait for you to release the API so we can use your SDE in our own tools.:D
 

scruffyduck

Administrator
Staff member
FSDevConf team
Resource contributor
#4
Can you please send me the xml you are using? You seems to be hitting problems which I do not see here. If I want to look at XML outside of SDE I use Cooktop which is a free XML Editor.

SDE does not allow the compile of libraries at the moment.
 
#7
Second the winsock has blanks in the tree view for polecolor and sockcolor.
All my windsocks that I wrote with XML show properly with SDE

Here is one that I added to my KATL.bgl before SDE was available and I wrote it in my XML. SDE shows pole and sock color correctly


<SceneryObject
lat="33.62061124295"
lon="-84.4461147487164"
alt="0.0F"
altitudeIsAgl="TRUE"
pitch="0"
bank="0"
heading="0"
imageComplexity="VERY_SPARSE">
<Windsock
poleHeight="5.5M"
sockLength="3.5M"
lighted="TRUE">
<PoleColor
red="148"
green="148"
blue="148"/>
<SockColor
red="240"
green="105"
blue="14"/>
</Windsock>
</SceneryObject>
 

scruffyduck

Administrator
Staff member
FSDevConf team
Resource contributor
#8
There are definitely problems with the XML Ron. It fails to validate against the schema, though for the moment I am not sure why. Turning off the validation causes SDE to throw and exception so maybe I can figure it out from there. In any case the XML is in an odd order - not that that really matters if the Compiler will accept it.

Hopefully I will have some better answers soon
 
#9
Jon,

There is no rush for me on this. I was just playing with a graphical representation of your SDE output into SGX, trying to import SGX xml first to SDE. I agree the SGX xml seems to have some "issues".

When validating what did import I got errors on lat and long for some sections. I could not find the errors as I have trouble understanding how you count the lines. (Did you mean that cooktop will show the correct line numbers) Perhaps since SGX provide very long lat/long number with large decimal places - could this be a line length issue?. Also the SGX xml has a lot of spaces between key/value pairs and the equals sign.

The windsock issue is perhaps due to the generic building section before it getting things out of sync.

Is SDE dependent on having the units set in the key/value pair or do you default to meters and use F for feet and NM for Nautical mile and M for meters where specific units are different from default.
 
Last edited:

scruffyduck

Administrator
Staff member
FSDevConf team
Resource contributor
#10
OK I have found two problems so far. Both related to the way SDE handles incoming XML files.

First is a problem with reading attributes for ModelData which is now fixed.

The second is that SceneGenX uses RunwayStarts rather than the more generic Starts. These have different XML but compile to the same Bgl Code.

RunwayStarts are nested in Runways and SDE does not handle them. SceneGenX seems to be the only tool to generate these rather than the generic Start which is nested in the Airport Record. SDE handles Runway Starts but hands over the data to Start. Unfortunately this does not work since RunwayStarts do not provide runway numbers, only end information. I need to figure out how best to handle this.
 
#11
Jon,

Wow, Please do not spend too much time on this - as I tested the example files with SGX and it does not import correctly there. So perhaps the example.xml files are not truly what SGX generates. You maybe trying to fix something that is not really broken - sorry for this error.

I started this trying to get traffic at the small airports around my hometown. I did a airport dump from trafficbuilder and saw that the small airports did not have parking spaces. So I was looking to add parking spaces to the airport.dat file. I need to create parking/taxiways eyc. in the both the BGL for the airport and the airport.dat file. SDE seems perfect for this.

I wanted a graphical program to create taxiways and also take the xml file for the bgl and convert to airport.dat file.

Edit ******

I may have found the issue with windsock.

The scenery object before is fuel trigger with bias instead of lat long. SDE displays lat long when the input is bias.
input data:

<!-- Scenery Object 4 - -->
<SceneryObject
lat = "35.0214369444444"
lon = "-110.716932777778"
alt = "0.0"
altitudeIsAgl = "TRUE"
pitch = "0.0"
bank = "0.0"
heading = "0.0"
imageComplexity = "VERY_SPARSE">
<Trigger type = "REFUEL_REPAIR" triggerHeight = "0.0">
<Fuel type = "JET" availability = "YES"/>
<Fuel type = "100" availability = "YES"/>
<Vertex biasX="30.0" biasZ="30.0"/>
<Vertex biasX="30.0" biasZ="-30.0"/>
<Vertex biasX="-30.0" biasZ="-30.0"/>
<Vertex biasX="-30.0" biasZ="30.0"/>
</Trigger>
</SceneryObject>

SDE output

<SceneryObject
lat="35.0214369444444"
lon="-110.716932777778"
alt="0.0M"
altitudeIsAgl="TRUE"
pitch="0"
bank="0"
heading="0"
imageComplexity="VERY_SPARSE">
<Trigger
type="REFUEL_REPAIR"
triggerHeight="0.0M">
<Fuel
type="JET"
availability="YES"/>
<Fuel
type="100"
availability="YES"/>
<Vertex
lat="0"
lon="0"/>
<Vertex
lat="0"
lon="0"/>
<Vertex
lat="0"
lon="0"/>
<Vertex
lat="0"
lon="0"/>
</Trigger>
</SceneryObject>

end edit *************
 
Last edited:

scruffyduck

Administrator
Staff member
FSDevConf team
Resource contributor
#12
Thanks Ron,

I have solutions for both the Model and Runway Start problems. I need to check the Trigger issue. SDE can handle both Bias and co-ordinates for vertex but it seem to have gotten confused there as it is reporting zero co-ord values :eek: I will check that out as well, Thanks for reporting it.

EDIT
I can now read the SGX test airport successfully and compile it t0 FSX. The returned Bgl de-compiles correctly. So SDE is now handling Runway Starts correctly. I can't find anything else wrong with it - the Ils and so on seems fine.

I am now looking at the problems with the model data and fuel triggers :)
 
Last edited:
#13
Jon,

Excellent news - It was my mistake that I indicated ILS had a problem. Ils should be okay. The example file for SGX has a problem with taxipaths etc. If I delete the taxipaths in the example file SGX imports correctly - Silly me I assumed an example file for SGX would work with SGX:confused:

Thanks again for the effort here.
 
Top