Exemple #1
0
        public static bool Normalize(this TagsCollection tags, TagsCollection profileTags, TagsCollection metaTags, IEnumerable <Vehicle> vehicles)
        {
            string str;

            if (!tags.TryGetValue("highway", out str))
            {
                return(false);
            }
            tags.NormalizeMaxspeed(profileTags, metaTags);
            tags.NormalizeOneway(profileTags, metaTags);
            tags.NormalizeOnewayBicycle(profileTags, metaTags);
            tags.NormalizeJunction(profileTags, metaTags);
            // ISSUE: reference to a compiler-generated method
            long stringHash = str.GetHashCode();

            if (stringHash <= 2067622972U)
            {
                if (stringHash <= 841786498U)
                {
                    if (stringHash <= 155541048U)
                    {
                        if ((int)stringHash != 4126140)
                        {
                            if ((int)stringHash != 155541048 || !(str == "footway"))
                            {
                                goto label_50;
                            }
                        }
                        else if (!(str == "pedestrian"))
                        {
                            goto label_50;
                        }
                    }
                    else if ((int)stringHash != 410259268)
                    {
                        if ((int)stringHash != 741716276)
                        {
                            if ((int)stringHash != 841786498 || !(str == "secondary_link"))
                            {
                                goto label_50;
                            }
                            else
                            {
                                goto label_46;
                            }
                        }
                        else if (!(str == "steps"))
                        {
                            goto label_50;
                        }
                    }
                    else if (str == "tertiary_link")
                    {
                        goto label_46;
                    }
                    else
                    {
                        goto label_50;
                    }
                    tags.NormalizeRamp(profileTags, metaTags, false);
                    profileTags.Add("highway", str);
                    goto label_50;
                }
                else if (stringHash <= 1266453457U)
                {
                    if ((int)stringHash != 908164533)
                    {
                        if ((int)stringHash != 1025494171)
                        {
                            if ((int)stringHash != 1266453457 || !(str == "secondary"))
                            {
                                goto label_50;
                            }
                            else
                            {
                                goto label_46;
                            }
                        }
                        else if (str == "road")
                        {
                            goto label_46;
                        }
                        else
                        {
                            goto label_50;
                        }
                    }
                    else if (str == "residential")
                    {
                        goto label_46;
                    }
                    else
                    {
                        goto label_50;
                    }
                }
                else if ((int)stringHash != 1457512036)
                {
                    if ((int)stringHash != 1512988633)
                    {
                        if ((int)stringHash != 2067622972 || !(str == "track"))
                        {
                            goto label_50;
                        }
                        else
                        {
                            goto label_46;
                        }
                    }
                    else if (!(str == "primary"))
                    {
                        goto label_50;
                    }
                }
                else if (str == "service")
                {
                    goto label_46;
                }
                else
                {
                    goto label_50;
                }
            }
            else if (stringHash <= 3245824490U)
            {
                if (stringHash <= 2772881565U)
                {
                    if ((int)stringHash != -2071507658)
                    {
                        if ((int)stringHash != -1522085731 || !(str == "unclassified"))
                        {
                            goto label_50;
                        }
                        else
                        {
                            goto label_46;
                        }
                    }
                    else if (str == "path")
                    {
                        profileTags.Add("highway", str);
                        goto label_50;
                    }
                    else
                    {
                        goto label_50;
                    }
                }
                else if ((int)stringHash != -1306006370)
                {
                    if ((int)stringHash != -1249381910)
                    {
                        if ((int)stringHash != -1049142806 || !(str == "motorway_link"))
                        {
                            goto label_50;
                        }
                    }
                    else if (!(str == "primary_link"))
                    {
                        goto label_50;
                    }
                }
                else if (str == "living_street")
                {
                    goto label_46;
                }
                else
                {
                    goto label_50;
                }
            }
            else if (stringHash <= 3647643189U)
            {
                if ((int)stringHash != -705505319)
                {
                    if ((int)stringHash != -700661456)
                    {
                        if ((int)stringHash != -647324107 || !(str == "services"))
                        {
                            goto label_50;
                        }
                        else
                        {
                            goto label_46;
                        }
                    }
                    else if (str == "cycleway")
                    {
                        profileTags.Add("highway", str);
                        goto label_50;
                    }
                    else
                    {
                        goto label_50;
                    }
                }
                else if (!(str == "motorway"))
                {
                    goto label_50;
                }
            }
            else if ((int)stringHash != -581013891)
            {
                if ((int)stringHash != -424251197)
                {
                    if ((int)stringHash != -37246338 || !(str == "trunk_link"))
                    {
                        goto label_50;
                    }
                }
                else if (str == "tertiary")
                {
                    goto label_46;
                }
                else
                {
                    goto label_50;
                }
            }
            else if (!(str == "trunk"))
            {
                goto label_50;
            }
            profileTags.Add("highway", str);
            goto label_50;
label_46:
            profileTags.Add("highway", str);
label_50:
            foreach (Vehicle vehicle in vehicles)
            {
                tags.NormalizeAccess(vehicle, str, profileTags);
            }
            return(true);
        }