Click or drag to resize

IMPORT CONSTRAINTS Statement

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
IMPORT CONSTRAINTS Statement

This statement allows for the import of turn constraints that affect the way links are traversed.

Caution note Caution

An IMPORT CONSTRAINTS statement will fail if it references street links that have already been committed to the destination table. For more information see the COMMIT Statement.

The constraints may be specified for certain time periods (such as specific hours or days of the year).

Example turn restrictions include:

  • Only emergency vehicles may make a U-turn on a highway (a turn from link A-B-C)
  • Only service vehicles may turn into link Q (from link P or link R)

sfif-import-restrictions

sfif-import-restrictions 2

Syntax

Alchemy
IMPORT CONSTRAINTS [ids = %id_col, speed = %speed, datespec = %datespec, traffic1 = %col1, dirTravel = %dirTravel] FROM "path\src_file" WHERE condition;

Nomenclature

ids An array of link IDs. The restriction applies only to the links (referenced by ID) contained in this array. Required parameter.
speed The legal speed limit. Measured in units appropriate to the country. Set using the UNITS statement. Required parameter. Must be set to 0, if constraint_type is "prohibited".
constraint_type A string value that should be "preferred" (this is a preferred vehicle route), "restricted" (by a 'soft' restriction, such as a 'No Trucks' street sign), or "prohibited" (whether legally or physically). Defaults to "prohibited", if not specified. Optional parameter.
tokenReq A boolean value indicating whether a token (such as a key or swipe card) is required for access. Optional parameter.
startLocs
Caution note Caution

This value is required, if any of the street data that the constraint applies to has not been imported (using the IMPORT STREETS statement).

IMPORT CONSTRAINTS must know the zlevel and LatLon of the start and end points of the street. The startLocs array may be used to provide this location information without requiring an IMPORT STREETS statement.

startLocs is a 4-element array. The first two elements are the LatLon and zlevel of the start of the street. The last two elements are the LatLon and zlevel of the end of the street. startLocs = [LatLon, zlevel, LatLon, zlevel].

These LatLon and zlevel values must match those of the street exactly, or the constraints will not be applied correctly. It is for this reason that using both IMPORT STREETS and IMPORT CONSTRAINTS together in your build script is encouraged.

dirTravel The direction of travel into which this constraint applies. Should be one of the strings "B" (both directions), "F" (from reference end), or "T" (to reference end). Required parameter.
trafficX One or more traffic types. See the 'Column Names' section below for a list of appropriate names. Optional parameter.
restrictions A hash table defining the type of vehicle that is constrained. See the 'Restrictions' section below. Optional parameter.
colX An expression referencing one or more columns in src_file.
datespec An array of hash tables describing the times and/or dates when the restriction applies. See the 'Datespec' section below. Required parameter.
path\src_fileSpecifies the path and file containing the shapefile data. Required expression.
condition A logic expression that is satisfied by a subset of the data in path\src_file. This expression, along with the WHERE keyword, is optional.

Column Names

The following columns may be used to control which traffic types the restriction applies to.

Caution note Caution

IMPORT CONSTRAINTS should not be used to restrict vehicle types from traversing a link - IMPORT CONSTRAINTS should only be used for single links with time restrictions.

Use the corresponding "AR_..." column during an IMPORT STREETS statement to restrict a vehicle type from traversing a link.

If no value is specified for a particular column, the Default value will be used.

Name

Description

Type

Values

Default

BUS

If true, this restriction applies to buses

Boolean

True/False

True

CAR

If true this restriction applies to cars

Boolean

True/False

True

CARPOOL

If true this restriction applies to carpools

Boolean

True/False

True

EMERGENCY

If true this restriction applies to emergency vehicles

Boolean

True/False

True

INTERMEDIATE_DOUBLE

If true this restriction applies to (intermediate) double-trailered trucks

Boolean

True/False

True

LONG_DOUBLE

If true this restriction applies to long double-trailered trucks

Boolean

True/False

True

OTHER_LCV

If true this restriction applies to light commercial vehicles

Boolean

True/False

True

STANDARD_DOUBLE

If true this restriction applies to standard double-trailered trucks

Boolean

True/False

True

STRAIGHT_TRUCK

If true this restriction applies to straight trucks (without trailers)

Boolean

True/False

True

TAXI

If true this restriction applies to taxis

Boolean

True/False

True

TRACTOR_SEMI_TRAILER

If true this restriction applies to tractors pulling a single semi-trailer

Boolean

True/False

True

TRUCK

If true this restriction applies to trucks

Boolean

True/False

True

TRIPLE

If true this restriction applies to triple-trailer trucks

Boolean

True/False

True

DateSpec

A datespec hash table has the following structure:

{
  type : %type,
  date1 : %ref_date,
  date2 : %exp_date,
  startTime : %starttime,
  endTime : %endtime,
  fromEnd : %fromend, (optional)
  exclude : %excl_date (optional)
}
Tip Tip

If a restriction always applies, set the corresponding datespec to zero (0)

Name

Description

Type

Values

type

A string describing the type of this date/time restriction.

This value defines the way in which date1 and date2 are used.

String

DateTimeType

date1

Usually the start date for the restriction. Usage depends on the type field.

String

See DateTimeType

date2

Usually the end date for the restriction. Usage depends on the type field.

A DateTimeType of 'DayMask' will not have a date2 specified.

String

See DateTimeType

startTime

The time at which the restriction starts to take effect.

String

HHMM

endTime

The time at which the restriction ceases to have an effect.

To specify a restriction that lasts for a full day (for all days that meet the restriction criteria specified by a combination of the type, date1 and date2 fields) set startTime to 0000 (midnight at the start of the day) and endTime to 2400 (midnight at the end of the day).

String

HHMM

fromEnd

Whether or not to specify the date "from the end" of a date period such as a month or a year. For example, if the DateTimeType is 'DayOfWeekOfMonth', Day is 2, Week is 1, and fromEnd is 'Y', the target date is the Monday in the last week of the month.

You cannot apply the attribute fromEnd to the DateTimeTypes 'DayOfMonth' or 'DayOfWeekOfYear'.

String

'Y' (from end) or 'N' (not from end)

exclude

Whether or not to exclude a date or date range from the constraints, if the defined date ranges overlap. For example, if you define a constraint from May to October every year with an exclude of 'N' and a constraint from June to August every year with an exclude of 'Y', the constraint applies in May, September, and October every year.

String

'Y' (exclude the date) or 'N' (do not exclude the date)

Restrictions

The restrictions hash table may contain zero or more of the following key-value pairs. Each key is of type string and each value is of type number.

KeyDescription
Agriculture_kgConstraint is applied to vehicles with a weight in kilograms of agricultural material equal to, or exceeding this value.
Coal_kgConstraint is applied to vehicles with a weight in kilograms of coal equal to, or exceeding this value.
Commodity_kgConstraint is applied to vehicles with a weight in kilograms of some commodity equal to, or exceeding this value.
BuildingMaterial_kgConstraint is applied to vehicles with a weight in kilograms of building materials equal to, or exceeding this value.
ExtremeAxleLength_cmConstraint is applied to vehicles with an extreme (end-to-end, measured in centimeters) axle length equal to, or exceeding this value.
GoodsHarmfulToWater_kgConstraint is applied to vehicles with a weight in kilograms of goods harmful to water equal to, or exceeding this value.
GrossWeight_kgConstraint is applied to vehicles with a gross weight in kilograms equal to, or exceeding this value.
Hazmat_0_kgConstraint is applied to vehicles with a weight in kilograms of an unspecified HAZMAT equal to, or exceeding this value.
Hazmat_1_kgConstraint is applied to vehicles with a weight in kilograms of class 1 hazardous material (explosives) equal to, or exceeding this value.
Hazmat_2_kgConstraint is applied to vehicles with a weight in kilograms of class 2 hazardous material (compressed gasses) equal to, or exceeding this value.
Hazmat_3_kgConstraint is applied to vehicles with a weight in kilograms of class 3 hazardous material (flammable liquids) equal to, or exceeding this value.
Hazmat_4_kgConstraint is applied to vehicles with a weight in kilograms of class 4 hazardous material (flammable solids) equal to, or exceeding this value.
Hazmat_5_kgConstraint is applied to vehicles with a weight in kilograms of class 5 hazardous material (oxidizers) equal to, or exceeding this value.
Hazmat_6_kgConstraint is applied to vehicles with a weight in kilograms of class 6 hazardous material (poisons) equal to, or exceeding this value.
Hazmat_7_kgConstraint is applied to vehicles with a weight in kilograms of class 7 hazardous material (radioactive material) equal to, or exceeding this value.
Hazmat_8_kgConstraint is applied to vehicles with a weight in kilograms of class 8 hazardous material (corrosive liquids) equal to, or exceeding this value.
Hazmat_9_kgConstraint is applied to vehicles with a weight in kilograms of class 9 hazardous material (miscellaneous, not covered by HAZMAT codes 1-8) equal to, or exceeding this value.
Hazmat_I_kgConstraint is applied to vehicles with a weight in kilograms of a material that poses an inhalation hazard equal to, or exceeding this value.
Height_cmConstraint is applied to vehicles with a height in centimeters equal to, or exceeding this value.
KingpinToLastAxle_cmConstraint is applied to vehicles with a length in centimeters from the kingpin to the last trailer axle equal to, or exceeding this value.
KingpinToMiddleOfLastTandem_cmConstraint is applied to vehicles with a length in centimeters from the kingpin to the middle of the last trailer tandem equal to, or exceeding this value.
KingpinToEnd_cmConstraint is applied to vehicles with a length in centimeters from the kingpin to the end of the vehicle equal to, or exceeding this value.
Length_cmConstraint is applied to vehicles with a vehicle length in centimeters equal to, or exceeding this value.
NaturalResource_kgConstraint is applied to vehicles with a weight of natural resources in kilograms equal to, or exceeding this value.
NumberOfAxlesConstraint is applied to vehicles with a number of truck (but not trailer) axles equal to, or exceeding this value.
NumberOfAxlesOnTrailersConstraint is applied to vehicles with a total number of axles on trailers less than, or equal to this value.
NumberOfAxlesOnTrailersGTEConstraint is applied to vehicles with a number of axles greater than, or equal to this value.
NumberOfAxlesUpToConstraint is applied to vehicles with a number of axles smaller than, or equal to this value.
NumberOfWheelsConstraint is applied to vehicles with a number of vehicle wheels smaller than, or equal to this value.
NumberOfTrailersConstraint is applied to vehicles with a number of trailers greater than, or equal to this value.
SandOrGravel_kgConstraint is applied to vehicles with a weight of sand or gravel in kilograms greater than, or equal to this value.
SanitaryWaste_kgConstraint is applied to vehicles with a weight of sanitary matter in kilograms greater than, or equal to this value.
TandemAxleWeight_kgConstraint is applied to vehicles with a tandem axle weight in kilograms greater than, or equal to this value.
TractorLength_cmConstraint is applied to vehicles with a tractor length in centimeters greater than, or equal to this value.
TrailerLength_cmConstraint is applied to vehicles with a trailer length in centimeters greater than, or equal to this value.
TrailerLengthLTE_cmConstraint is applied to vehicles with a trailer length (in centimeters) less than, or equal to this value.
TridemAxleWeight_kgConstraint is applied to vehicles with a tridem axle weight in kilograms greater than, or equal to this value.
UnladenWeight_kgConstraint is applied to vehicles with an unladen vehicle weight in kilograms greater than, or equal to this value.
WeightPerAxle_kgConstraint is applied to vehicles with a weight per axle in kilograms greater than, or equal to this value.
Width_cm Constraint is applied to vehicles with a vehicle width greater than, or equal to this value.

Example