Ejemplo n.º 1
0
        /// <summary>
        /// Returns true if the vehicle is allowed on the way represented by these tags
        /// </summary>
        protected override bool IsVehicleAllowed(IAttributeCollection tags, string highwayType)
        {
            if (!tags.InterpretAccessValues(VehicleTypes, "access"))
            {
                return(false);
            }

            // do the designated tags.
            var bicycle = string.Empty;

            if (tags.TryGetValue("bicycle", out bicycle))
            {
                if (bicycle == "designated")
                {
                    return(true); // designated bicycle
                }
                if (bicycle == "yes")
                {
                    return(true); // yes for bicycle
                }
                if (bicycle == "no")
                {
                    return(false); //  no for bicycle
                }
            }
            if (highwayType == "steps")
            {
                if (tags.Contains("ramp", "yes"))
                {
                    return(true);
                }
                return(false);
            }
            return(AccessibleTags.ContainsKey(highwayType));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Returns true if the vehicle is allowed on the way represented by these tags
        /// </summary>
        protected override bool IsVehicleAllowed(IAttributeCollection tags, string highwayType)
        {
            if (!tags.InterpretAccessValues(VehicleTypes, "access"))
            {
                return(false);
            }

            var foot = string.Empty;

            if (tags.TryGetValue("foot", out foot))
            {
                if (foot == "designated")
                {
                    return(true); // designated foot
                }
                if (foot == "yes")
                {
                    return(true); // yes for foot
                }
                if (foot == "no")
                {
                    return(false); // no for foot
                }
            }
            return(AccessibleTags.ContainsKey(highwayType));
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Returns true if the vehicle is allowed on the way represented by these tags
 /// </summary>
 protected override bool IsVehicleAllowed(IAttributeCollection tags, string highwayType)
 {
     if (!tags.InterpretAccessValues(VehicleTypes, "access"))
     {
         return(false);
     }
     return(AccessibleTags.ContainsKey(highwayType));
 }