Osm2city.py: Difference between revisions

Jump to navigation Jump to search
recommend fgelevcaching
(recommend fgelevcaching)
Line 136: Line 136:
* get OSM data
* get OSM data
* adjust input file
* adjust input file
* create elevation grid, run FG to probe elevation data
* if you have < 4GB RAM: create elevation grid, run FG to probe elevation data.
* run osm2city
* run osm2city
* install the generated scenery
* install the generated scenery
Line 159: Line 159:
:* set PATH_TO_SCENERY to a standard FG_SCENERY path. Suppose the area you want to populate is /home/user/fgfs/scenery/Objects/e010n40/e011n47/, PATH_TO_SCENERY would then be /home/user/fgfs/scenery/ .
:* set PATH_TO_SCENERY to a standard FG_SCENERY path. Suppose the area you want to populate is /home/user/fgfs/scenery/Objects/e010n40/e011n47/, PATH_TO_SCENERY would then be /home/user/fgfs/scenery/ .
:* you might want to set MAX_OBJECTS to a small number (say, 100) for your first try. This will limit the number of buildings parsed, and speed up the whole process.
:* you might want to set MAX_OBJECTS to a small number (say, 100) for your first try. This will limit the number of buildings parsed, and speed up the whole process.
=== Probe elevation ===
=== Probe elevation ===
* probe elevation for the region in params.ini:
Probe elevation for the region in params.ini. Set the ELEV_MODE in params.ini. There are three modes. If you have enough memory (4GB should be fine, but YMMV) and run an FG git version later than 10 Oct 2014, try FgelevCaching. Failing that, try Manual.
* Set the ELEV_MODE in params.ini
 
* ELEV_MODE = FgelevCaching
:* Set FG_ELEV to your fgelev executable. For example: FG_ELEV = /usr/local/fg/bin/fgelev or just FG_ELEV = fgelev if fgelev is already in your OS's path.
:* Set PATH_TO_SCENERY (Missing terrain will result in error message)
 
* ELEV_MODE = Manual
* ELEV_MODE = Manual
:* run tools.py (tools.py -f LOWI/params.ini), this will create a file elev.in. Copy elev.in to $FGDATA/Nasal/
:* run tools.py (tools.py -f LOWI/params.ini), this will create a file elev.in. Copy elev.in to $FGDATA/Nasal/
Line 167: Line 172:
:* run FG, open debug->nasal console, enter: elev.get_elevation(), press execute. Might take a long time, depending on the area scanned. This will write elevation data to /tmp/elev.out (which is actually just plain 5 column data: lon,lat,x,y,elevation). Put elev.out into LOWI/
:* run FG, open debug->nasal console, enter: elev.get_elevation(), press execute. Might take a long time, depending on the area scanned. This will write elevation data to /tmp/elev.out (which is actually just plain 5 column data: lon,lat,x,y,elevation). Put elev.out into LOWI/
:* unhide, rename the objects folder
:* unhide, rename the objects folder
* ELEV_MODE = Telnet
* ELEV_MODE = Telnet
:* Run setup.py
:* Run setup.py
:* Start FG with the properties service on Port 5501
:* Start FG with the properties service on Port 5501
:* Run tools.py, this will create a elev.in, start the nasal script and copy the elev.out back to your project directory
:* Run tools.py, this will create a elev.in, start the nasal script and copy the elev.out back to your project directory
* ELEV_MODE = Fgelev
:* Set FG_ELEV to your fgelev executable
:* Set PATH_TO_SCENERY (Missing terrain will result in error message)
:* Run tools.py this will generate the elev.out using fgelev This can take considerable time.


=== Run osm2city ===
=== Run osm2city ===
153

edits

Navigation menu