Osm2city.py: Difference between revisions

Jump to navigation Jump to search
m
→‎Adjust input file: new params file requires quoted strings
m (→‎Probe elevation: $FG_DATA → $FG_ROOT)
m (→‎Adjust input file: new params file requires quoted strings)
Line 185: Line 185:


Edit this file, adjusting (at least) the following:
Edit this file, adjusting (at least) the following:
:* PREFIX = LOWI (the project directory)
:* PREFIX = "LOWI" (the project directory)
:* BOUNDARY_EAST, BOUNDARY_NORTH, BOUNDARY_SOUTH, BOUNDARY_WEST
:* BOUNDARY_EAST, BOUNDARY_NORTH, BOUNDARY_SOUTH, BOUNDARY_WEST
:* OSM_FILE = buildings.osm
:* OSM_FILE = "buildings.osm"
:* set PATH_TO_SCENERY to a standard [[$FG_SCENERY]] path. This is the path where we'll get the elevation from. Most likely you'll want to use your TerraSync path here. Suppose the area you want to populate is /home/user/fgfs/scenery/TerraSync/Objects/e010n40/e011n47/, PATH_TO_SCENERY would then be /home/user/fgfs/scenery/TerraSync .
:* set PATH_TO_SCENERY to a standard [[$FG_SCENERY]] path. This is the path where we'll get the elevation from. Most likely you'll want to use your TerraSync path here. Suppose the area you want to populate is /home/user/fgfs/scenery/TerraSync/Objects/e010n40/e011n47/, PATH_TO_SCENERY would then be "/home/user/fgfs/scenery/TerraSync" .
:* set PATH_TO_OUTPUT to a ''different'' scenery path, e.g. /home/user/fgfs/scenery/osm2city . Osm2city will generate its objects there. First, this avoids TerraSync overwriting the generated scenery. Second, you can easily remove that folder in case you're not happy with the result. Make sure to include that path in your [[$FG_SCENERY]].
:* set PATH_TO_OUTPUT to a ''different'' scenery path, e.g. "/home/user/fgfs/scenery/osm2city" . Osm2city will generate its objects there. First, this avoids TerraSync overwriting the generated scenery. Second, you can easily remove that folder in case you're not happy with the result. Make sure to include that path in your [[$FG_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.
:* you also need to set up elevation probing in the parameters file, described in the next section.
:* you also need to set up elevation probing in the parameters file, described in the next section.
153

edits

Navigation menu