コード例 #1
0
ファイル: ReferencedNWBDecoder.cs プロジェクト: emij/OpenLR
        /// <summary>
        /// Calculates a match between the tags collection and the properties of the OpenLR location reference.
        /// </summary>
        /// <param name="tags"></param>
        /// <param name="fow"></param>
        /// <param name="frc"></param>
        /// <returns></returns>
        public override float MatchArc(TagsCollectionBase tags, FormOfWay fow, FunctionalRoadClass frc)
        {
            FormOfWay           actualFow;
            FunctionalRoadClass actualFrc;

            if (NWBMapping.ToOpenLR(tags, out actualFow, out actualFrc))
            { // a mapping was found. match and score.
                return(MatchScoring.MatchAndScore(frc, fow, actualFrc, actualFow));
            }
            return(0);
        }
コード例 #2
0
ファイル: CoderProfile.cs プロジェクト: mshakurov/OpenLR
        /// <summary>
        /// Matches nwb/fow.
        /// </summary>
        public virtual float Match(IAttributeCollection attributes, FormOfWay fow, FunctionalRoadClass frc)
        {
            FormOfWay           actualFow;
            FunctionalRoadClass actualFrc;

            if (this.Extract(attributes, out actualFrc, out actualFow))
            { // a mapping was found. match and score.
                return(MatchScoring.MatchAndScore(frc, fow, actualFrc, actualFow));
            }
            return(0);
        }