vissim2gmns.func_lib.cvt_vissim_to_wgs1984

vissim2gmns.func_lib.cvt_vissim_to_wgs1984(x_vissim: float, y_vissim: float, x_refmap: float, y_refmap: float, x_refnet: float, y_refnet: float) tuple[source]

Convert single coordinate from VISSIM to WGS 1984.

Local coordinates in PTV Vissim use a cartesian coordinate system, with a reference to a background position in Mercator coordinates.

Parameters:
  • x_vissim (float) – the x coordinate in VISSIM

  • y_vissim (float) – the y coordinate in VISSIM

  • x_refmap (float) – coordinates of the reference point of the background map(Mercator).

  • y_refmap (float) – coordinates of the reference point of the background map(Mercator).

  • x_refnet (int) – coordinates of the reference point of the network(Cartesian Vissim System).

  • y_refnet (int) – coordinates of the reference point of the network(Cartesian Vissim System).

Example

>>> from vissim2geojson import cvt_vissim_to_wgs1842
>>> x_refmap = -9772674.016  # You can get this value from VISSIM software.
>>> y_refmap = 5317775.409  # You can get this value from VISSIM software.
>>> x_refnet = 0  # You can get this value from VISSIM software.
>>> y_refnet = 0  # You can get this value from VISSIM software.
>>> x_vissim = -0.255  # The x coordinate in .inpx file (coordinate in VISSIM)
>>> y_vissim = 39.368  # The y coordinate in .inpx file (coordinate in VISSIM)
>>> # Convert VISSIM coordinates to WGS 1984 coordinates.
>>> cvt_vissim_to_wgs1842(x_vissim, y_vissim, x_refmap, y_refmap, x_refnet, y_refnet)
>>> # return the converted coordinate in WGS 1984, [Longitude, Latitude]
>>> (-77.036870, 38.907192)
Returns:

the converted coordinate in WGS 1984, [Longitude, Latitude]

Return type:

list