POLYCONVERT

Contents

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

Configuration

Option Default Value Description
-c <FILE>
--configuration-file <FILE>
Loads the named config on startup
--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 false Adds comments to saved template, configuration, or schema

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 Default Value 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 false The type will be made of the key-value - pair.
--osm.use-name false The id will be set from the given 'name' attribute.
--shapefile-prefixes <FILE> Reads shapes from shapefiles FILE+
--shapefile.guess-projection false Guesses the shapefile's projection
--shapefile.id-column <FILE> Defines in which column the id can be found
--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 Default Value Description
-o <FILE>
--output-file <FILE>
polygons.xml Write generated polygons/pois to FILE

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 Default Value Description
--simple-projection false Uses a simple method for projection
--proj.scale <INT> 0 Number of places to shift decimal point to right in geo-coordinates
--proj.utm false Determine the UTM zone (for a universal transversal mercator projection based on the WGS84 ellipsoid)
--proj.dhdn false Determine the DHDN zone (for a transversal mercator projection based on the bessel ellipsoid)
--proj <STRING>  ! Uses STR as proj.4 definition for projection
--proj.inverse false Inverses projection

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 Default Value Description
--prune.in-net false Enables pruning on net boundaries
--prune.in-net.offsets <STRING> 0,0,0,0 Uses STR as offset definition added to the net boundaries
--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 Default Value Description
--offset.x <FLOAT> 0 Adds FLOAT to net x-positions
--offset.y <FLOAT> 0 Adds FLOAT to net y-positions

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 Default Value Description
--color <STRING> 0.2,0.5,1. Sets STR as default color
--prefix <STRING> Sets STR as default prefix
--type <STRING> unknown Sets STR as default type
--layer <INT> -1 Sets INT as default layer
--discard false Sets default action to discard

Report

These option change the reporting behaviour of POLYCONVERT.

Option Default Value Description
-v
--verbose
false Switches to verbose output
-p
--print-options
false Prints option values before processing
-?
--help
true Prints this screen
-V
--version
false Prints the current version
-W
--no-warnings
false Disables output of warnings
-l <FILE>
--log <FILE>
Writes all messages to FILE
--message-log <FILE> Writes all non-error messages to FILE
--error-log <FILE> Writes all warnings and errors to FILE

See Also


Known Issues



This page was last modified on 27 October 2011, at 10:15.