# Source: bemap-model/bemap-roadFeature.js

    /**
     * BeNomad BeMap JavaScript API - RoadFeature
     */

    /**
     * @classdesc
     * Base class for road features.
     * @public
     * @constructor
     * @abstract
     * @param {object} options see below the available values.
     * @param {String} options.DirectionFlaw The direction of traffic flow per transportation modes. For each mode, possible values are: - CLOSE: closed in both directions.
         - OPEN_POS: open in positive direction.
         - OPEN_NEG: open in negative direction.
         - OPEN: open in both directions.
     * @param {Boolean} options.Urban Urban / not urban flag.
     * @param {Boolean} options.Tunnel A flag that indicates if road is part of a tunnel or not.
     * @param {Boolean} options.Bridge A flag that indicates if road is part of a bridge or not.
     * @param {Boolean} options.MaxSpeedVerified Max speed verified flag(true: verified, false: calculated).
     * @param {Boolean} options.CarPool : A flag that indicates if road is reserved to carpooling.
     * @param {Boolean} options.MainCategory A flag that enables discrimination within road 's of a same FCC type (depends of map provider).
     * @param {Int} options.DualCarriageway A flag that indicates if road is part of a dual carriageway(e.g.with physical separation between opposite traffic sides) .0: no or unknown, 1: yes.
     * @param {Int} options.NoThroughTr No through traffic restriction(0: no restriction, 1: restriction, 2: restriction for trucks only).
     * @param {Int} options.Toll Toll information: 0 no toll, 1 toll in positive direction, 2 toll in negative direction, 3 toll in both directions.
     * @param {Int} options.Tax This fields indicates if road is submitted to a government tax(like German MAUT, etc) .0 means no tax, 1 - 3 defines the tax category(country dependent).
     * @param {String} options.MatchDir The matching direction: - CLOSE: Undefined matched direction and closed in both directions.
         - OPEN_POS: Matched in positive direction.
         - OPEN_NEG: Matched in negative direction.
         - OPEN: Undefined matched direction and open in both directions.
     * @param {Int} options.NbLanePos The number of lanes in positive direction(0 if traffic closed in positive direction or if lane information is not available).
     * @param {Int} options.NbLaneNeg The number of lanes in negative direction(0 if traffic closed in negative direction or if lane information is not available).
     * @param {String} options.PedestrianInfrastructureType The pedestrian infrastructure type: -UNDEFINED = 0 Undefined.
         - ZONE = 1: Pedestrian Zone.
         - HIKING = 2 - Hiking.
         - UNPAVED_ROAD = 3 - Unpaved Road.
         - ROUGH_ROAD = 4 - Rough Road.
         - POOR_CONDITION_ROAD = 5 - Poor Condition Road.
         - STAIRS = 6 - Stairs.
         - TUNNEL = 7 - Tunnel.
         - ELEVATOR = 8 - Elevator.
         - ESCALATOR = 9 - Escalator.
         - FOOTBRIDGE = 10 - Footbridge.
    * @param {Int} options.MaxSpeed The speed limit in kph(0 if not available).
    * @param {Array.<bemap.CondMaxSpeed>} options.CondMaxSpeed A conditional speed limit.
    * @param {Int} options.AverageSpeed The average speed in kph.
    * @param {Int} options.Lenght The length in meters.
     */
    bemap.RoadFeature = function(options) {
        var opts = options || {};

        /**
         * @type {String}
         * @protected
         */
        this.DirectionFlow = opts.DirectionFlow ? opts.DirectionFlow : null;

        /**
         * @type {Boolean}
         * @protected
         */
        this.Urban = opts.Urban !== undefined ? opts.Urban : null;

        /**
         * @type {Boolean}
         * @protected
         */
        this.Tunnel = opts.Tunnel !== undefined ? opts.Tunnel : null;

        /**
         * @type {Boolean}
         * @protected
         */
        this.Bridge = opts.Bridge !== undefined ? opts.Bridge : null;

        /**
         * @type {Boolean}
         * @protected
         */
        this.MaxSpeedVerified = opts.MaxSpeedVerified !== undefined ? opts.MaxSpeedVerified : null;

        /**
         * @type {Boolean}
         * @protected
         */
        this.CarPool = opts.CarPool !== undefined ? opts.CarPool : null;

        /**
         * @type {Boolean}
         * @protected
         */
        this.MainCategory = opts.MainCategory !== undefined ? opts.MainCategory : null;

        /**
         * @type {Int}
         * @protected
         */
        this.DualCarriageway = opts.hasOwnProperty("DualCarriageway") ? opts.DualCarriageway : null;

        /**
         * @type {Int}
         * @protected
         */
        this.NoThroughTr = opts.hasOwnProperty("NoThroughTr") ? opts.NoThroughTr : null;

        /**
         * @type {Int}
         * @protected
         */
        this.Toll = opts.hasOwnProperty("Toll") ? opts.Toll : null;

        /**
         * @type {Int}
         * @protected
         */
        this.Tax = opts.hasOwnProperty("Tax") ? opts.Tax : null;

        /**
         * @type {String}
         * @protected
         */
        this.MatchDir = opts.MatchDir ? opts.MatchDir : null;

        /**
         * @type {Int}
         * @protected
         */
        this.NbLanePos = opts.hasOwnProperty("NbLanePos") ? opts.NbLanePos : null;

        /**
         * @type {Int}
         * @protected
         */
        this.NbLaneNeg = opts.hasOwnProperty("NbLaneNeg") ? opts.NbLaneNeg : null;

        /**
         * @type {String}
         * @protected
         */
        this.PedestrianInfrastructureType = opts.PedestrianInfrastructureType ? opts.PedestrianInfrastructureType : null;

        /**
         * @type {Int}
         * @protected
         */
        this.MaxSpeed = opts.hasOwnProperty("MaxSpeed") ? opts.MaxSpeed : null;

        /**
         * @type {Int}
         * @protected
         */
        this.AverageSpeed = opts.hasOwnProperty("AverageSpeed") ? opts.AverageSpeed : null;

        /**
         * @type {Array.<bemap.CondMaxSpeed>}
         * @protected
         */
        this.CondMaxSpeed = opts.CondMaxSpeed ? opts.CondMaxSpeed : [];

        /**
         * @type {Int}
         * @protected
         */
        this.Length = opts.hasOwnProperty("Length") ? opts.Length : null;
    };

    /**
    * Get the direction of traffic flow per transportation modes.
    * @return {String}
    */
    bemap.RoadFeature.prototype.getDirectionFlow = function() {
      return this.DirectionFlow;
    };

    /**
    * Get the urban / not urban flag.
    * @return {Boolean}
    */
    bemap.RoadFeature.prototype.getUrban = function() {
      return this.Urban;
    };

    /**
    * Get the flag that indicates if road is part of a tunnel or not.
    * @return {Boolean}
    */
    bemap.RoadFeature.prototype.getTunnel = function() {
      return this.Tunnel;
    };

    /**
    * Get the flag that indicates if road is part of a bridge or not.
    * @return {Boolean}
    */
    bemap.RoadFeature.prototype.getBridge = function() {
      return this.Bridge;
    };

    /**
    * Get max speed verified flag.
    * @return {Boolean}
    */
    bemap.RoadFeature.prototype.getMaxSpeedVerified = function() {
      return this.MaxSpeedVerified;
    };

    /**
    * Get  the flag that indicates if road is reserved to carpooling.
    * @return {Boolean}
    */
    bemap.RoadFeature.prototype.getCarPool = function() {
      return this.CarPool;
    };

    /**
    * Get the flag that enables discrimination within road 's of a same FCC type.
    * @return {Boolean}
    */
    bemap.RoadFeature.prototype.getMainCategory = function() {
      return this.MainCategory;
    };

    /**
    * Get the flag that indicates if road is part of a dual carriageway(e.g.with physical separation between opposite traffic sides).
    * @return {Int}
    */
    bemap.RoadFeature.prototype.getDualCarriageway = function() {
      return this.DualCarriageway;
    };

    /**
    * Get
    * @return {Int}
    */
    bemap.RoadFeature.prototype.getNoThroughTr = function() {
      return this.NoThroughTr;
    };

    /**
    * Get toll information.
    * @return {Int}
    */
    bemap.RoadFeature.prototype.getToll = function() {
      return this.Toll;
    };

    /**
    * Get the fields that indicates if road is submitted to a government tax(like German MAUT, etc).
    * @return {Int}
    */
    bemap.RoadFeature.prototype.getTax = function() {
      return this.Tax;
    };

    /**
    * Get the matching direction.
    * @return {String}
    */
    bemap.RoadFeature.prototype.getMatchDir = function() {
      return this.MatchDir;
    };

    /**
    * Get The number of lanes in positive direction.
    * @return {Int}
    */
    bemap.RoadFeature.prototype.getNbLanePos = function() {
      return this.NbLanePos;
    };

    /**
    * Get The number of lanes in negative direction.
    * @return {Int}
    */
    bemap.RoadFeature.prototype.getNbLaneNeg = function() {
      return this.NbLaneNeg;
    };

    /**
    * Get the pedestrian infrastructure type
    * @return {String}
    */
    bemap.RoadFeature.prototype.getPedestrianInfrastructureType = function() {
      return this.PedestrianInfrastructureType;
    };

    /**
    * Get the speed limit in kph
    * @return {Int}
    */
    bemap.RoadFeature.prototype.getMaxSpeed = function() {
      return this.MaxSpeed;
    };

    /**
    * Get the average speed in kph.
    * @return {}
    */
    bemap.RoadFeature.prototype.getAverageSpeed = function() {
      return this.AverageSpeed;
    };

    /**
    * Get the conditional max speed.
    * @return {Array.<bemap.CondMaxSpeed>}
    */
    bemap.RoadFeature.prototype.getCondMaxSpeed = function() {
      return this.CondMaxSpeed;
    };

    /**
    * Get the length in meters.
    * @return {Int}
    */
    bemap.RoadFeature.prototype.getLength = function() {
      return this.Length;
    };