• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

population density data

igr

Messages
113
Hi
I am curious if is it possible to export population density data from cvx....bgl file? As I understand this it is some kind of image but it's not clear to me if there are some copyrights to this images of population density. So if I want to find out what's population density in some area, could I include such algorithm to my program? If the answer is positive then another question: how could I find out the correct file for the area which I am interested (I mean I know longitude and latitude and I want to find out where the file for this area is placed and how it is named).

And last idea, would it be possible to extract data about the routes (the paths where car are traveling across the map). This is for the purpose that when I create ortophoto, I would like to place the routes over it so cars could go over my aerial imaginary scenery. Maybe this is wrong way for solution but my experience is that when I load aerial imaginary scenery so there are no cars in the game. Maybe it is because they don't know the exact paths where cars should go in real world? Maybe the routes are just random generated?
 
The contents of all BGL files that ship as part of the core sim are completely copyrighted and protected. Microsoft paid licensing fees for the information they contain.
 
For what it's worth, the magdec.bgl is in the form of a table of 16 bit intergers that have to be scaled.

Code:
for (Latitude = -90; Latitude < 90; ++Latitude)
     {
      for (Longitude = 0; Longitude < 360; ++Longitude)
          {
          ++Count;
          // Convert into row and colums in table
         Col = Latitude + 90;
         Row = Longitude;

         // Get offset of start of table in file
        Offset = INITIAL_OFFSET + ((Row * 181) + (Col)) * 2;

        // Position in file
        FileSeek(FileHandle, Offset, 0);

       // Read bytes from file
      BytesRead = FileRead(FileHandle, &MyWORD, BYTES_TO_READ);

     // Convert to 16 bit signed integer
     sValue = (signed) MyWORD;

     // Convert to magnetic variation
     MagVar = (double)sValue / CONVERSION;
           }
      }

EDIT

Not worth as much as I thought.

PopulationDensity.bgl is in C:\Microsoft Games\Microsoft Flight Simulator X\Scenery\BASE\Scenery and is 31,598,500 bytes
 
Last edited:
I rather doubt that Microsoft paid licensing fees for the information contained in most terrain BGLs, and unless "WarpD" was personally and directly involved in the creation of "all BGL files that ship as part of the core sim", that comment would risk diverting this thread into the "spiral of death" (aka "soon to be locked status") ...which IIRC, all such EULA / legal / copyright discussions are likely to incur here at FS Developer.

IMHO, such comments bring to mind what some believe may have happened on certain aircraft during the 911 hijackings. :alert:

WUAuPCSLgr.jpg



I suggest that this thread might instead best focus on offering an answer to the OP's question about how to create photo-real scenery which also displays "highway traffic". :idea:


AFAIK, "Highway traffic" is a CVX vector BGL attribute called via a GUID, and typically would only be seen when various types of vector and "park-type land class texture" raster content are rendered by FS at run time.

That's not to say that it cannot also be done concurrent with use of custom photo-real land class textures, however (ex: via a discrete gray-scale value in blend mask areas allowing underlying vector objects in default or custom CVX vector BGLs to show through the top photo-real textures). ;)

https://www.google.com/#q=FSX SDK highway traffic site:www.fsdeveloper.com


Anyone else have detailed ideas on how to do this ...to help the OP ? :scratchch

GaryGB
 
Last edited:
Vehicular traffic has no brain and thus does not know if it's sitting on top of photo or land class based scenery. So what's the problem?

Depending upon the where's and how much's, something like OSM road data could be culled down to "magically" transform itself into vector data indicating road traffic. If it's done programmatically, then another set of vector points placed slightly to a side can handle traffic going in the other direction. Because remember, there is (T)o and (F)rom, but never (B)oth.
 
That's not to say that it cannot also be done concurrent with use of custom photo-real land class textures, however (ex: via discrete gray-scale value in blend mask areas allowing underlying vector objects in default or custom CVX vector BGLs to show through the top photo-real textures). ;)

https://www.google.com/#q=FSX SDK highway traffic site:www.fsdeveloper.com

GaryGB

Here I have problem with understanding because english is not my native language so the sentences are too much complicated to me. But I would strictly refuse using blending masks because they cost a lot of resources and performance*. *As written in manual.
 
I am puzzled. Does the OP want population density data or not? In which it appears to be given in PopulationDensity.bgl in C:\Microsoft Games\Microsoft Flight Simulator X\Scenery\BASE\Scenery and is 31,598,500 bytes
 
IIUC from what Lance stated above, if the OP wishes to utilize vector highway traffic aligned precisely with real world roads ex: as seen on ones properly placed custom photo-real land class textures, one need not use a blend mask to allow underlying vector objects in custom CVX vector BGLs to show through the top photo-real textures.

Reportedly , this is because vector objects for highway traffic in custom CVX vector BGLs are able to be displayed ...regardless of whether one is using default "park-type' land class textures, or custom photo-real land class textures.

To create the vector poly-lines for ones intended highway traffic, one could utilize ex: SBuilderX (using the aerial imagery for one's intended custom photo-real land class textures as a "background map") ...and then compile that vector data to a BGL via SHP2VEC.

Creating highly 'detailed' road data with highway traffic may have a potential FS run time performance hit far greater than a Blend Mask in custom photo-real land class textures (the latter of which BTW, is nearly imperceptible)


However, rather than creating one's own highly 'detailed' road data with highway traffic, one instead could utilize Scenery Solutions' "Ultimate Terrain" payware products from Flight1.

Ultimate Terrain products feature both major and minor roads, with the option via a "configuration" utility to control display (or non-display) of most features provided by that real world aerial imagery-derived vector data set ...which means it should align with nearly all custom photo-real aerial imagery-derived raster land class textures.

http://www.flight1.com/products.asp?search=true&filter=all&txtsearch=Scenery Solutions

BTW: IIRC, according to information posted years ago by Allen Kreisman of Scenery Solutions, they did not use the 'population density' data of FS to determine what types of (small areas) of land class textures or traffic content to place in ex: urban versus rural areas; rather, they reportedly utilized the number of roads in a given area (aka "road density") ...which was already known from their road vector data set.

Hope this helps ! :)

GaryGB
 
Last edited:
Hi,

The default freeway traffic will work fine with a photo scenery as well. I don't see a reason why they should dissappear when you add a photo scenery. So it should not be needed to make new freeway traffic, unless the road data used is not accurate enough. But in general it's quite good.

The population density data is in the BGL file mentioned, but I'm not sure what the OP exactly wants to do with it. The data is used as far as I know to influence how much traffic is shown on the roads. So the vector data defines where the roads are, but the population density influences how dense the traffic is.
 
Population density would be derived from local censuses which are public information. so it makes no sense to copyright information that is already in the public domain. In any case the population counts would now be seriously out of date.
 
Population density - if I found how to extract them (now I am learning to read bgl format) I could use them to optimize night textures light intensity. Because the more population town/city has the more light it gives. But not linearly. One more problem I could have is calculation from QMid dimentions to WGS84 Datum of appropriete zoom. But that's another story).
 
Instead of read the data from the BGL file, why not just find similar geographical data online and use that instead? I think that's easier.

I did a quick search and there is some global population data available. I'm not sure if that has the same resolution as the FS data, but I highly suspect that MS must have used such a source as well.

http://sedac.ciesin.columbia.edu/data/collection/gpw-v3

For tuning night lighting there is no need to use exactly the same data as FS has, you can just use the best data you can find.
 
IGR, From what I see you mixing up road vectors, with photo imagery, with landclasses.

Best thing to do is change the land classes.

Best way to do that, I've found, is to use a low resolution greyscale Geotiff. You'd have paint over a map, I'd recommend >20m/pix. You could cover 400km sq in a 1000x1000 geotiff.

Examples are in the SDK.

Here's a quote from where I found this out.

"It's got examples in the terrain SDK. It's just a greyscale geotiff with the greyscale values indicating a specific landclass. Easy to paint over a large area in the shades one needs.

The values correspond to RBG. So Broadleaf forest is 30, (30,30,30).

The values are listed here https://msdn.microsoft.com/en-us/library/cc707102.aspx

But you can use the Tmf viewer to open WorldLC in FSX/scenery/base/scenery (change the LOD to 5) and then, set a coordinate, zoom in (+/-), and hold your mouse over a pixel, it gives the value and description along the bottom."


http://www.fsdeveloper.com/forum/threads/landclass-blending.433181/

You can also put custom roads in with SBuilderX by drawing over the Map.

Traffic is directly proportional to the user's land traffic settings, not to any population density afaik.
 
I don't mix those traffic with pop density. It's clear to me they are different things. I can use pop density to produce different light in night textures. This has nothing to do with traffic. I asked if it is possible to extract the data about traffic.
 
Yes, the gridded data is in the form of an image, for example GeoTIFF. I guess you can also find the data in vector format if you want (for the Netherlands I have found such data in vector format before).

For Europe I found this source, which seems reasonable detailed. I think if you want even more detail you need to look at national or local data sources for the area you are working on.

http://www.eea.europa.eu/data-and-m...y-disaggregated-with-corine-land-cover-2000-2
 
Thanks I am downloading*. But it is from year 2000, The FSX data could be more fresh I think. I am still interested if it is possible to extract the data just for curiosity.

And If I would extract the image from bgl what format show I need to proccess? DXT, BMP, TIFF?

* - I couldn't open it by FastStone viewe or Photoshop it says it's not correct format/type.
 
Last edited:
Hi,

There is a thread with some information about the terrain BGL format, but you can't just simply read an image from the BGL file. Internally in the BGL the data is stored organised per terrain tile, with levels of detail, etc. So you can't think of the BGL file as another form of an image.

To extract the data you would have to write your own decompiler tool and do quite some reverse engineering, as the exact format is not known. So for sure an interesting subject, but it would take quite some effort I would say.

And of course we always need to be careful that we might not be allowed to reuse the data from the BGL, as we don't know what licenses apply to it. Officially we are not allowed to extract data from BGL files at all.

I don't think population density data is made very often. As mentioned before it often comes from censuses, which don't happen that often. So I doubt you can find much more recent data for such a big area. I would not be surprised if the data in FSX is even older. Given the way the data is used in FS, that's also not so important.
 
Once I wanted to change the density population data because I wanted more road traffic in a determined zone, and in some website I read that have something to do, and I read that have to do with the coast leisure boats traffics, someone could modify this data editing the image file, (colors) but can't remember how it was. another issue is if this modified file can be shared in some realeased scenery.
 
@erno:
in that case I take it as answer that it is not possible to extract the density data from bgl because of unknown encoding. So I will not try. I am not so skilled programmer to reverse engeneer image format.

What keywords did you exactly use to search the density pop sources?
I've tried to do some search and I have only found the same tiff image as you reffered to me:
http://www.integrated-assessment.eu/resource_centre/eu_population_totals_100_metre_grid
but I am curious why I cannot open it
 
Last edited:
Back
Top