POLYCONVERT

generated on 2018-12-14 00:24:44.765647 from the wiki page for POLYCONVERT for SUMO git

From 30.000 feet

POLYCONVERT imports geometrical shapes (polygons or points of interest) from different sources, converts them to a representation that may be visualized using SUMO-GUI.

Purpose: Polygon and POI import, conversion, and projection
System: portable (Linux/Windows is tested); runs on command line
Input (mandatory): polygons or pois
Output: SUMO-shape file
Programming Language: C++

Features

  • Imports OSM, VISUM, Elmar, XML, ArcView shape files
  • per-type import settings
  • projections using a given proj.4-definition or via a matching network
  • Writes simulation shape files usable within SUMO-GUI and SUMO

Usage Description

POLYCONVERT is able to import shapes from different file types. Normally, for importing data of a certain type, the type name is used as option name and the value indicates the position of the file. So

polyconvert --visum mynet.net -o converted.poi.xml

imports from a VISUM-net file.

Options

You may use a XML schema definition file for setting up a POLYCONVERT configuration: polyconvertConfiguration.xsd.

Configuration

All applications of the SUMO-suite handle configuration options the same way. These options are discussed at Basics/Using the Command Line Applications#Configuration Files.

Option Description
-c <FILE>
--configuration-file <FILE>
Loads the named config on startup
-C <FILE>
--save-configuration <FILE>
Saves current configuration into FILE
--save-template <FILE> Saves a configuration template (empty) into FILE
--save-schema <FILE> Saves the configuration schema into FILE
--save-commented <BOOL> Adds comments to saved template, configuration, or schema; default: false

Input

POLYCONVERT is capable to apply different attributes to the imported shapes in dependence of their "type". Not all imported formats have a type information. When using shape files, for example, all instances of an artifact type are normally stored in a distinct shape file.

Option Description
-n <FILE>
--net-file <FILE>
Loads SUMO-network FILE as reference to offset and projection
--dlr-navteq-poly-files <FILE> Reads polygons from FILE assuming they're coded in DLR-Navteq (Elmar)-format
--dlr-navteq-poi-files <FILE> Reads pois from FILE+ assuming they're coded in DLR-Navteq (Elmar)-format
--visum-files <FILE> Reads polygons from FILE assuming it's a Visum-net
--xml-files <FILE> Reads pois and shapes from FILE assuming they're coded in XML
--osm-files <FILE> Reads pois from FILE+ assuming they're coded in OSM
--osm.keep-full-type <BOOL> The type will be made of the key-value - pair; default: false
--osm.use-name <BOOL> The id will be set from the given 'name' attribute; default: false
--osm.merge-relations <FLOAT> If FLOAT >= 0, assemble one polygon from all ways of a relation if they all connect with gaps below FLOAT; default: -1
--shapefile-prefixes <FILE> Reads shapes from shapefiles FILE+
--shapefile.guess-projection <BOOL> Guesses the shapefile's projection; default: false
--shapefile.id-column <STRING> Defines in which column the id can be found
--shapefile.use-running-id <BOOL> A running number will be used as id; default: false
--shapefile.add-param <BOOL> Extract all additional columns as params; default: false
--shapefile.fill <STRING> [auto|true|false]. Forces the 'fill' status to the given value. Default 'auto' tries to determine it from the data type
--type-file <FILE> Reads types from FILE

Output

All imported shapes that have not been discarded are written into a file which has to be defined using --output <FILE>.

Option Description
--write-license <BOOL> Include license info into every output file; default: false
--output-prefix <STRING> Prefix which is applied to all output files. The special string 'TIME' is replaced by the current time.
--precision <INT> Defines the number of digits after the comma for floating point output; default: 2
--precision.geo <INT> Defines the number of digits after the comma for lon,lat output; default: 6
-H <BOOL>
--human-readable-time <BOOL>
Write time values as hour:minute:second or day:hour:minute:second rathern than seconds; default: false
-o <FILE>
--output-file <FILE>
Write generated polygons/pois to FILE
--dlr-tdp-output <FILE> Write generated polygons/pois to a dlr-tdp file with the given prefix

Projection

One of the major uses of POLYCONVERT is to apply a projection on the read shapes. Normally, one wants the shapes to be aligned in accordance to a previously imported road network. In this case, the network should be given using --net-file <FILE>. But it is also possible to use a different projection. In any case, if the read coordinates shall be changed, --use-projection must be given.

Option Description
--simple-projection <BOOL> Uses a simple method for projection; default: false
--proj.scale <FLOAT> Scaling factor for input coordinates; default: 1
--proj.rotate <FLOAT> Rotation (clockwise degrees) for input coordinates; default: 0
--proj.utm <BOOL> Determine the UTM zone (for a universal transversal mercator projection based on the WGS84 ellipsoid); default: false
--proj.dhdn <BOOL> Determine the DHDN zone (for a transversal mercator projection based on the bessel ellipsoid, "Gauss-Krueger"); default: false
--proj <STRING> Uses STR as proj.4 definition for projection; default: !
--proj.inverse <BOOL> Inverses projection; default: false
--proj.dhdnutm <BOOL> Convert from Gauss-Krueger to UTM; default: false
--proj.plain-geo <BOOL> Write geo coordinates in output; default: false

Pruning

Sometimes, shapes cover a much larger area than the network. In order to reduce the amount of data, one can force POLYCONVERT to prune the imported data on the network's or a given boundary. Read shapes which are completely outside this boundary are discarded in these cases.

Option Description
--prune.in-net <BOOL> Enables pruning on net boundaries; default: false
--prune.in-net.offsets <STRING> Uses STR as offset definition added to the net boundaries; default: 0,0,0,0
--prune.boundary <STRING> Uses STR as pruning boundary
--prune.keep-list <STRING> Items in STR will be kept though out of boundary
--prune.explicit <STRING> Items with names in STR will be removed

Processing

Option Description
--offset.x <FLOAT> Adds FLOAT to net x-positions; default: 0
--offset.y <FLOAT> Adds FLOAT to net y-positions; default: 0
--all-attributes <BOOL> Imports all attributes as key/value pairs; default: false
--ignore-errors <BOOL> Continue on broken input; default: false
--poi-layer-offset <FLOAT> Adds FLOAT to the layer value for each poi (i.e. to raise it above polygons); default: 0

Building Defaults

When importing shapes for which no type-dependent attributes have been given, the following default values are used which can be changed on the command line.

Option Description
--color <STRING> Sets STR as default color; default: 0.2,0.5,1.
--prefix <STRING> Sets STR as default prefix
--type <STRING> Sets STR as default type; default: unknown
--fill <BOOL> Fills polygons by default; default: true
--layer <FLOAT> Sets FLOAT as default layer; default: -1
--discard <BOOL> Sets default action to discard; default: false

Report

All applications of the SUMO-suite handle most of the reporting options the same way. These options are discussed at Basics/Using the Command Line Applications#Reporting Options.

Option Description
-v <BOOL>
--verbose <BOOL>
Switches to verbose output; default: false
--print-options <BOOL> Prints option values before processing; default: false
-? <BOOL>
--help <BOOL>
Prints this screen; default: false
-V <BOOL>
--version <BOOL>
Prints the current version; default: false
-X <STRING>
--xml-validation <STRING>
Set schema validation scheme of XML inputs ("never", "auto" or "always"); default: auto
--xml-validation.net <STRING> Set schema validation scheme of SUMO network inputs ("never", "auto" or "always"); default: never
-W <BOOL>
--no-warnings <BOOL>
Disables output of warnings; default: false
-l <FILE>
--log <FILE>
Writes all messages to FILE (implies verbose)
--message-log <FILE> Writes all non-error messages to FILE (implies verbose)
--error-log <FILE> Writes all warnings and errors to FILE

See Also



This page was last modified on 3 September 2018, at 21:36.