Difference between revisions of "Autogen from OpenStreetMap data with scenProc"
(→Creating vegetation) |
MichaelCox (talk | contribs) (minor updates) |
||
Line 103: | Line 103: | ||
So that looks very nice, but you might be thinking we went over the hard work in the CREATEAGNPOLYVEG step a bit quick. So let's have a closer look at how that step works. As exampled above it takes two arguments, a filter and a GUID. These will be explained in more detail here. | So that looks very nice, but you might be thinking we went over the hard work in the CREATEAGNPOLYVEG step a bit quick. So let's have a closer look at how that step works. As exampled above it takes two arguments, a filter and a GUID. These will be explained in more detail here. | ||
− | The filter is used to select from which vector features you want to create the vegetation. See the [scenProc] manual for details on the syntax of the filter. What we want to do here is select all polygons that are forest. We'll use QGIS to figure out which attributes the vector data has. Actually there are | + | The filter is used to select from which vector features you want to create the vegetation. See the [scenProc] manual for details on the syntax of the filter. What we want to do here is select all polygons that are forest. We'll use QGIS to figure out which attributes the vector data has. Actually there are multip ... \n |
− | + | == private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm == | |
− | + | Offers private label cosmetics with custom design. We produce lip balms, serum, creams and more. Easy to buy with eshop. Private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm | |
− | [[ | + | [[http://ultra-high-end.com/custom-made.html private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm]] |
− | + | [[http://ultra-high-end.com/custom-made.html private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm]] | |
− | + | == private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm == | |
− | + | Offers private label cosmetics with custom design. We produce lip balms, serum, creams and more. Easy to buy with eshop. Private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm | |
− | + | [[http://ultra-high-end.com/custom-made.html private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm]] | |
− | + | [[http://ultra-high-end.com/custom-made.html private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm]] | |
− | + | == private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm == | |
− | + | Offers private label cosmetics with custom design. We produce lip balms, serum, creams and more. Easy to buy with eshop. Private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm | |
− | + | [[http://ultra-high-end.com/custom-made.html private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm]] | |
− | + | [[http://ultra-high-end.com/custom-made.html private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm]] | |
− | + | == private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm == | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | Offers private label cosmetics with custom design. We produce lip balms, serum, creams and more. Easy to buy with eshop. Private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm | |
− | + | [[http://ultra-high-end.com/custom-made.html private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm]] | |
− | + | [[http://ultra-high-end.com/custom-made.html private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm]] | |
− | + | == private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm == | |
− | + | Offers private label cosmetics with custom design. We produce lip balms, serum, creams and more. Easy to buy with eshop. Private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm | |
− | + | [[http://ultra-high-end.com/custom-made.html private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm]] | |
− | + | [[http://ultra-high-end.com/custom-made.html private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm]] | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 09:06, 3 March 2016
This tutorial describes how you can use the data from OpenStreetMap to create autogen for FSX. We'll cover all the steps, including downloading and selecting your data, how to configure the tools to create the autogen and how it finally looks in FSX.
In this tutorial I will be using the area around Luxembourg city as an example. And just so that you can see the difference, below is a picture of the scenery without any autogen in it. In the end of this tutorial you will have populated that area with autogen.
Contents
- 1 Required tools
- 2 Downloading the data
- 3 Selecting the data you need
- 4 Creating vegetation
- 5 private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm
- 6 private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm
- 7 private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm
- 8 private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm
- 9 private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm
Required tools
You will need a couple of tools to create autogen from OpenStreetMap data. This section discusses the tools you need.
GIS editor
We will be using ESRI shapefiles, which is a common format to store GIS vector data. Therefore you will need a tool to view and edit such shapefiles. In this tutorial I will be using the open source QGIS tool, but any other GIS editor should also work fine. A good way to install QGIS is to use OSGeo4W, which includes other useful GIS tools as well.
scenProc
scenProc is the tool that will create the AGN autogen files for FSX from the GIS vector files. Here you can find the manual and information on how to download scenProc.
Downloading the data
Our first step is to get the data we will work with. We will be using OpenStreetMap data. On their own website you can view the data and you can also download it in their own OSM format (which is XML). But that format is not so easy to process with GIS tools. Therefore we will download a shapefile version of the data.
Such shapefiles can be found locations on the internet, but we will be using those made by GeoFabrik. From their website you can download shapefiles of the OpenStreetMap data organised per country. For some big countries the data is split into different packages per region. In this case I will download the Luxembourg file.
After you unzip the file you downloaded, you should see shapefiles with the following names:
- buildings
- landuse
- natural
- places
- points
- railways
- roads
- waterways
Each shapefile consists of a couple of files, so you will see files with the extensions shp, shx, dbf and prj. You should always keep these files together, as they are all needed for tools to be able to read the shapefile.
The names give a good indication of what you will find in the different shapefiles. In general this is what you can find in each of them:
- buildings: polygons with the shape of buildings
- landuse: polygons with landuse information, so where are residential or industrial areas for example
- natural: polygons with natural information, for example forests and parks
- places: points with place names
- points: all kind of other points of interest
- railways: lines for the railways
- roads: lines for roads
- waterways: lines for rivers
For the autogen we will mainly be using the shapefiles with buildings, natural and points. After loading these three shapefiles into QGIS you should see something like this:
Selecting the data you need
In most cases you would not want to process the vector data of an entire country at once. So then you need to select the data you want to use. For this tutorial I will select the area around Luxembourg city. So the first step is to zoom in on the area you want to use in QGIS.
Make sure you have the natural layer selected. Then use the "Select features by rectangle" tool to select all features on your screen. Then right click on the layer and use "Save selection as" to save the selected features to a new shapefile. The image below shows the menu.
You need to repeat this step for each layer (so natural, buildings and points). It's best to save the resulting shapefiles in a new folder. So in this case we end up with three shapefiles for the area of Luxembourg city. The image below shows how these resulting files look in QGIS.
Creating vegetation
So now it is time to start creating some autogen. To do this we need to create a configuration file for scenProc that tells the tool what we want to do. So start scenPRoc and enter the following content:
# Luxembourg City autogen IMPORTSHP|natural.shp|NOREPROJ # SPLITGRID|AGN # CREATEAGNPOLYVEG|FTYPE=POLYGON;type=forest|{e8b937fd-a1f2-4bd5-8548-2c80d30102af} # WRITEAGNFILES|FSX|C:\flightsim\belgium_photo\texture
All lines starting with # are a comment. We'll walk through the other lines now and explain what they do.
IMPORTSHP tells the tool that it needs to read data from a shapefile. The first argument is the name of your shapefile, since we want to make vegetation now we will load the file natural.shp. The second argument can be used to reproject your data to WGS84, but the OpenStreetMap data we downloaded already is in that projection. So therefore we use NOREPROJ as option.
The line SPLITGRID tells scenProc that it needs to split all features in a smaller grid. The option AGN means that the tool will automatically use the correct grid size for autogen. This size corresponds with the LOD tile size of the terrain scenery.
The line CREATEAGNPOLYVEG does the real work. It takes two arguments, one is the filter and the other is the vegetation GUID. How these two arguments work I will discuss below.
The final line, WRITEAGNFILES tells scenProc where it needs to write the actual AGN files. The first argument is the FS version you want to make autogen for (FSX in this case). The second argument is the folder to save the AGN file, so you should provide the texture folder of your photo scenery there.
And that's all, now you can run this file through scenProc and your autogen will be created. Just press the run button and wait for the processing to finish. Once it is finished you should have the AGN files in your texture folder and when you startup FSX you should see the vegetation autogen. Just like the image below:
So that looks very nice, but you might be thinking we went over the hard work in the CREATEAGNPOLYVEG step a bit quick. So let's have a closer look at how that step works. As exampled above it takes two arguments, a filter and a GUID. These will be explained in more detail here.
The filter is used to select from which vector features you want to create the vegetation. See the [scenProc] manual for details on the syntax of the filter. What we want to do here is select all polygons that are forest. We'll use QGIS to figure out which attributes the vector data has. Actually there are multip ... \n
private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm
Offers private label cosmetics with custom design. We produce lip balms, serum, creams and more. Easy to buy with eshop. Private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm
[private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm]
[private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm]
private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm
Offers private label cosmetics with custom design. We produce lip balms, serum, creams and more. Easy to buy with eshop. Private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm
[private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm]
[private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm]
private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm
Offers private label cosmetics with custom design. We produce lip balms, serum, creams and more. Easy to buy with eshop. Private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm
[private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm]
[private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm]
private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm
Offers private label cosmetics with custom design. We produce lip balms, serum, creams and more. Easy to buy with eshop. Private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm
[private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm]
[private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm]
private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm
Offers private label cosmetics with custom design. We produce lip balms, serum, creams and more. Easy to buy with eshop. Private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm
[private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm]
[private label cosmetics, custom made cosmetic, custom made cream, custom lip stick lip balm]