Sign in to follow this  
Guest christian

Naming convention of FS2002 and FS9 Scenedb .bgl files

Recommended Posts

Hi all:Gilles Gauthier and I are writing a short tutorial on adjusting lake elevations for default and add-on terrain mesh. One of the steps would be much quicker if we knew the naming convention of the FS2002 Scenedb HYP*.bgl files.I figured out the naming convention for the FS9 equivalents (see below) but was surprised to notice that those files have entirely different names in FS2002. I searched this forum but couldn't find any information. How can I find a specific file given its lat/long (other than figuring out the regional subfolder)? Does anyone know? Cheers, Holger--------This what I came up with for the FS9 files:Each of the vector/polygon files covers a LOD5 grid cell, i.e., 2.8125 degrees of latitude (90 / 2power5) and 3.75 degrees of longitude (120 / 2power5). The FS world has a coordinate system that starts at 90N, 180W and increases to the South and East. Thus, for the LOD5 grid resolution, there are 64 cells N-S and 96 cells W-E.The first two digits following 'HL9' depict the longitudional cell number and the next two digits the latitudional cell number. To derive the file name for a specific location the math (for the northern hemisphere west of Greenwich!) is as follows:cell No. Longitude = TRUNC((180-long)/3.75)cell No. Latitude = TRUNC((90-lat)/2.8125)'TRUNC': truncates a number to an integer by removing the fractional part of the number.For eastern longitudes the formula becomes '180+long' and for southern latitudes '90+lat'. Don't use negative numbers for western longitudes or southern latitudes!Example for W123 N47: W123 = 15.2 = 15, N47 = 15.289 = 15, so the file in question is HL915150.bgl (There's always a final '0' before the '.bgl' extension).

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi Holger.I don't know the naming convention.I do use a tool, LocBGL, available from the Scenery Hall of Fame:http://www.scenery.org/design_utilities_b.htmThe tool will examine the world coodinates at the beginning of the BGL to see if a specific lat-long could exist in the scenery. FS2004's VTP and LWM files still contain this BGL header, and so can be searched with this tool.Dick

Share this post


Link to post
Share on other sites

Hi Dick:thanks for the super-fast response! Sounds like the utility will do what we need.As far as I can tell, the first three digits are for N-S and the last three for W-E. Both numbers increase/decrease in steps of 4, i.e. from 540 to 544. Also, the longitude digits increases when moving east, similar to the FS9 convention. However, the latitude digits decrease with increasing latitude (at least in the northern hemisphere) and only range from the 470s to the 570s. Strange... Cheers, Holger

Share this post


Link to post
Share on other sites

Hi Holger.I do remember from FS2002 the naming is in latitudinal bands, and they are in sequence from W180* eastward to E180* within each band. I also remember they are overlapping each other.We could use a utility to check for location possibilities through out a folder ( and sub-folders ) by checking the headers.I don't know if there is any difference in the TDF data between FS2002 and FS2004, but appparently the data has been recompiled. Maybe TMFViewer could tell us if the roads, coasts, lakes or streams have changed in the new version.Dick

Share this post


Link to post
Share on other sites

Hi Holger,Your algorithm is correct. I just figured that out myself a few weeks ago. What is your problem?Cheers, Christian

Share this post


Link to post
Share on other sites

Hi Christian:I'm looking for a similar algorithm, if it exists, for the FS2002 files, not the FS9 files.Cheers, Holger

Share this post


Link to post
Share on other sites

This is funny. A long time ago I tried to understand it for FS2002, but gave up eventually. Then I tried again for FS9 and worked it out quite fast. I thought that I was just being stupid haven't worked it out for FS2002, but since you pointed it out to me now, I just checked and it's really different for FS2002. And I thought it was the same...Sorry, can't help you any further. I think the files are still based on a LOD5 grid, because that's why I thought that FS2002 and FS9 are the same. Maybe it's a LOD recursive sequence (just like the texture names), rather than a grid no.Cheers, Christian

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this