Arcs¶
The Arcs dataframe is used to draw straight arcs between pairs of locations
on a Leaflet map. VeRoViz provides two functions to generate Arcs dataframes
from a list of coordinates: createArcsFromLocSeq()
and createArcsFromNodeSeq()
.
The table below describes each of the fields/columns of an Arcs dataframe:
Field Name |
Data Type |
Description |
---|---|---|
odID |
int |
Each origin/destination pair should have a unique odID. |
objectID |
string |
Identifier for each object (e.g., truck, package, drone, etc.) shown in Cesium. |
startLat |
float |
Latitude of the start of the arc, in [degrees]. 0-degrees latitude is the equator. Negative latitudes are south of the equator; positive latitudes are north. The range is from -90 to +90. |
startLon |
float |
Longitude of the start of the arc, in [degrees]. 0-degrees longitude is Greenich, England. Negative longitudes are west of Greenich; positive longitudes are east. The range is from -180 to +180. |
endLat |
float |
Latitude of the end of the arc, in [degrees]. The range is from -90 to +90. |
endLon |
float |
Longitude of the end of the arc, in [degrees]. The range is from -180 to +180. |
leafletColor |
string |
Color of the arc when displayed in Leaflet. See Leaflet Style for options of colors. |
leafletOpacity |
float in [0, 1] |
Amount of transparency for the arc. A value of 1 indicates no transparency; 0 indicates completely transparent. |
leafletStyle |
string |
Styling of the line, valid options are “solid”, “dotted” or “dashed”. See Leaflet Style for more details |
leafletWeight |
int |
Pixel width of the line/arc. |
leafletCurveType |
string |
The type of curve to be shown on a leaflet map for :ref:Arc dataframes (curves will not be applied to :ref:Assignments dataframes). The options are ‘Bezier’, ‘greatcircle’, and ‘straight’. If Bezier is provided, the leafletCurvature is also required. If greatcircle is provided, the arc follows the curvature of the Earth. |
leafletCurvature |
float in (-90, 90) |
If leafletCurveType is ‘Bezier’, then leafletCurvature is required; otherwise this argument will not be used. The curvature specifies the angle between a straight line connecting the two nodes and the curved arc emanating from those two nodes. Therefore, this value should be in the open interval (-90, 90), although values in the (-45, 45) range tend to work best. |
useArrows |
bool |
True if the arrows will be used when creating Leaflet map, false otherwise. When generating Arcs, this defaults to True. |
cesiumColor |
string |
Color of the arc when displayed in Cesium. See Cesium Style for color options. |
cesiumOpacity |
float in [0, 1] |
The amount of transparency for the arc. A value of 1 indicates no transparency; 0 indicates completely transparent. |
cesiumStyle |
string |
Styling of the line, valid options are “solid”, “dotted” or “dashed”. See Cesium Style for options. |
cesiumWeight |
int |
Pixel width of the line/arc. |
popupText |
string |
Text (or HTML) that will be displayed when a user clicks on the arc in Leaflet. |
startElevMeters |
float |
Elevation of the start point, in units of meters above ground level. |
endElevMeters |
float |
Elevation of the end point, in units of meters above ground level. |
Arcs and Assignments dataframes are similar, see Dataframes Comparison for the similarity and differences between them.
An Arcs dataframe can be used in createLeaflet()
. The table below indicates whether a field (column) is required/optional/ignored.
Note
Some explaination about “Required”, “Optional”, “Ignored”:
“Required” means the function needs info from that field/column. That info can not be overridden by the function that uses the dataframe.
“Optional” means the function will use the info from that field/column as a default value. However, some functions allow the user to temporarily “override” the optional values in the dataframe with different values provided in the function call.
“Ignored” means the function neither needs nor uses info from that field/column.
Field Name |
Required |
Optional |
Ignored |
---|---|---|---|
odID |
✓ |
||
objectID |
✓ |
||
startLat |
✓ |
||
startLon |
✓ |
||
endLat |
✓ |
||
endLon |
✓ |
||
leafletColor |
✓ |
||
leafletOpacity |
✓ |
||
leafletStyle |
✓ |
||
leafletWeight |
✓ |
||
leafletCurveType |
✓ |
||
leafletCurvature |
✓ |
||
useArrows |
✓ |
||
cesiumColor |
✓ |
||
cesiumOpacity |
✓ |
||
cesiumStyle |
✓ |
||
cesiumWeight |
✓ |
||
popupText |
✓ |
||
startElevMeters |
✓ |
||
endElevMeters |
✓ |