Osm2city.py Batch: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
No edit summary
m (+ Template:Lowercase title)
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{lowercase title}}
{{OSM Navigation}}
{{OSM Navigation}}
Osm2city can now be used to create complete Tiles. It simplifies the usage of the osm2city.py tools.
osm2city can now be used to create complete [[Tile_Index_Scheme|tiles]]. It simplifies the usage of the osm2city.py toolchain. Currently it is tested for windows, but is planned to be portable.


== Features ==
== Features ==
* Building of tile directories. {{done}}
* Building of tile directories. {{done}}
* Generation of elevation map. {{progressbar|30}}
* Generation of elevation map. {{done}}
* Generation of download batch. {{done}}
* Generation of download batch. {{done}}
* Generation of osm2city batch. {{done}}
* Generation of osm2city batch. {{done}}
* Generation of osm2pylons batch. {{not done}}
* Generation of osm2pylons batch. {{done}}
== Setup.py ==
* Generation of roads batch. {{done}}
== build-tiles.py ==
* Generation of piers batch. {{done}}
== toolsXXXX.[sh|cmd] ==
== Workflow ==
== downloadXXXX.[sh|cmd] ==
=== Setup.py ===
== osm2cityXXXX.[sh|cmd] ==
=== Adapt params.ini ===
Since the next step distributes the params.ini to several subdirectories it is advisable to edit the template params.ini
=== build-tiles.py ===
Call build_tiles.py
 
<syntaxhighlight lang="bash" start="" highlight="" enclose="">
python batch_processing/build_tiles.py -t w003n60 -f params_kp.ini -o params.ini
</syntaxhighlight>
 
This step copies the params_kp.ini and adds the tilename as a PREFIX and outputs to params.ini.
You can use option "-p" on linux and mac in order to generate scripts with parallel processing support and specify the
max number of parallel processes when calling the generated scripts.
 
<syntaxhighlight lang="ini" start="" highlight="" enclose="">
#-- Scenery folder (typically a geographic name or the ICAO code of the airport
PREFIX = w010n50/w006n55
</syntaxhighlight>
 
=== tools[ew]XXX[ns][YY].[sh|cmd] ===
Generated by build-tiles.py and contains the calls to all subdirectories of the tile [ew]XXX[ns][YY].
=== downloadXXXX.[sh|cmd] ===
Generated by build-tiles.py and contains wget calls to download all the subtiles of [ew]XXX[ns][YY] into the subdirectories.
=== osm2cityXXXX.[sh|cmd] ===
Generated by build-tiles.py and contains the calls to all subdirectories of the tile [ew]XXX[ns][YY].
 
Example
 
<syntaxhighlight lang="bash" start="" highlight="" enclose="">
python osm2city.py -f w010n60/w003n60/2909568/params.ini
python osm2city.py -f w010n60/w003n60/2909569/params.ini
python osm2city.py -f w010n60/w003n60/2909570/params.ini
python osm2city.py -f w010n60/w003n60/2909571/params.ini
python osm2city.py -f w010n60/w003n60/2909576/params.ini
python osm2city.py -f w010n60/w003n60/2909577/params.ini
python osm2city.py -f w010n60/w003n60/2909578/params.ini
python osm2city.py -f w010n60/w003n60/2909579/params.ini
python osm2city.py -f w010n60/w003n60/2909584/params.ini
python osm2city.py -f w010n60/w003n60/2909585/params.ini
python osm2city.py -f w010n60/w003n60/2909586/params.ini
python osm2city.py -f w010n60/w003n60/2909587/params.ini
python osm2city.py -f w010n60/w003n60/2909592/params.ini
python osm2city.py -f w010n60/w003n60/2909593/params.ini
python osm2city.py -f w010n60/w003n60/2909594/params.ini
python osm2city.py -f w010n60/w003n60/2909595/params.ini
python osm2city.py -f w010n60/w003n60/2909600/params.ini
python osm2city.py -f w010n60/w003n60/2909601/params.ini
python osm2city.py -f w010n60/w003n60/2909602/params.ini
python osm2city.py -f w010n60/w003n60/2909603/params.ini
python osm2city.py -f w010n60/w003n60/2909608/params.ini
python osm2city.py -f w010n60/w003n60/2909609/params.ini
python osm2city.py -f w010n60/w003n60/2909610/params.ini
python osm2city.py -f w010n60/w003n60/2909611/params.ini
python osm2city.py -f w010n60/w003n60/2909616/params.ini
python osm2city.py -f w010n60/w003n60/2909617/params.ini
python osm2city.py -f w010n60/w003n60/2909618/params.ini
python osm2city.py -f w010n60/w003n60/2909619/params.ini
python osm2city.py -f w010n60/w003n60/2909624/params.ini
python osm2city.py -f w010n60/w003n60/2909625/params.ini
python osm2city.py -f w010n60/w003n60/2909626/params.ini
python osm2city.py -f w010n60/w003n60/2909627/params.ini
 
</syntaxhighlight>

Latest revision as of 11:23, 12 April 2020

Autogen Scenery
Started in 11/2013
Description Improved autogen support for FlightGear using OSM data
Contributor(s) radi, vanosten, Soitanen, portreekid
Status Under active development as of 02/2016
Topic branches:
$FG_SRC https://gitlab.com/osm2city/osm2city/
fgdata https://gitlab.com/osm2city/osm2city-data/

osm2city can now be used to create complete tiles. It simplifies the usage of the osm2city.py toolchain. Currently it is tested for windows, but is planned to be portable.

Features

  • Building of tile directories. Done Done
  • Generation of elevation map. Done Done
  • Generation of download batch. Done Done
  • Generation of osm2city batch. Done Done
  • Generation of osm2pylons batch. Done Done
  • Generation of roads batch. Done Done
  • Generation of piers batch. Done Done

Workflow

Setup.py

Adapt params.ini

Since the next step distributes the params.ini to several subdirectories it is advisable to edit the template params.ini

build-tiles.py

Call build_tiles.py

python batch_processing/build_tiles.py -t w003n60 -f params_kp.ini -o params.ini

This step copies the params_kp.ini and adds the tilename as a PREFIX and outputs to params.ini. You can use option "-p" on linux and mac in order to generate scripts with parallel processing support and specify the max number of parallel processes when calling the generated scripts.

#-- Scenery folder (typically a geographic name or the ICAO code of the airport
PREFIX = w010n50/w006n55

tools[ew]XXX[ns][YY].[sh|cmd]

Generated by build-tiles.py and contains the calls to all subdirectories of the tile [ew]XXX[ns][YY].

downloadXXXX.[sh|cmd]

Generated by build-tiles.py and contains wget calls to download all the subtiles of [ew]XXX[ns][YY] into the subdirectories.

osm2cityXXXX.[sh|cmd]

Generated by build-tiles.py and contains the calls to all subdirectories of the tile [ew]XXX[ns][YY].

Example

python osm2city.py -f w010n60/w003n60/2909568/params.ini
python osm2city.py -f w010n60/w003n60/2909569/params.ini
python osm2city.py -f w010n60/w003n60/2909570/params.ini
python osm2city.py -f w010n60/w003n60/2909571/params.ini
python osm2city.py -f w010n60/w003n60/2909576/params.ini
python osm2city.py -f w010n60/w003n60/2909577/params.ini
python osm2city.py -f w010n60/w003n60/2909578/params.ini
python osm2city.py -f w010n60/w003n60/2909579/params.ini
python osm2city.py -f w010n60/w003n60/2909584/params.ini
python osm2city.py -f w010n60/w003n60/2909585/params.ini
python osm2city.py -f w010n60/w003n60/2909586/params.ini
python osm2city.py -f w010n60/w003n60/2909587/params.ini
python osm2city.py -f w010n60/w003n60/2909592/params.ini
python osm2city.py -f w010n60/w003n60/2909593/params.ini
python osm2city.py -f w010n60/w003n60/2909594/params.ini
python osm2city.py -f w010n60/w003n60/2909595/params.ini
python osm2city.py -f w010n60/w003n60/2909600/params.ini
python osm2city.py -f w010n60/w003n60/2909601/params.ini
python osm2city.py -f w010n60/w003n60/2909602/params.ini
python osm2city.py -f w010n60/w003n60/2909603/params.ini
python osm2city.py -f w010n60/w003n60/2909608/params.ini
python osm2city.py -f w010n60/w003n60/2909609/params.ini
python osm2city.py -f w010n60/w003n60/2909610/params.ini
python osm2city.py -f w010n60/w003n60/2909611/params.ini
python osm2city.py -f w010n60/w003n60/2909616/params.ini
python osm2city.py -f w010n60/w003n60/2909617/params.ini
python osm2city.py -f w010n60/w003n60/2909618/params.ini
python osm2city.py -f w010n60/w003n60/2909619/params.ini
python osm2city.py -f w010n60/w003n60/2909624/params.ini
python osm2city.py -f w010n60/w003n60/2909625/params.ini
python osm2city.py -f w010n60/w003n60/2909626/params.ini
python osm2city.py -f w010n60/w003n60/2909627/params.ini