Esempio n. 1
0
        private string getNavigateMode(navigateType ntype, querysourceType qtype)
        {
            string result = "";

            switch (ntype)
            {
            case navigateType.e_downstream_diversions:
                result = "DD";
                break;

            case navigateType.e_upstream_main:
                result = "UM";
                break;

            case navigateType.e_upstream_tributaries:
                result = "UT";
                break;

            case navigateType.e_downstream_main:
            default:
                result = "DM";
                break;
            }//end switch
            string qstring = getQuerySource(qtype);

            return(string.IsNullOrEmpty(qstring) ? result : result + "/" + qstring);
        }
Esempio n. 2
0
        private string getQuerySource(querysourceType qtype)
        {
            switch (qtype)
            {
            case querysourceType.e_wqpsites:
                return("wqp");

            case querysourceType.e_huc12pourpoints:
                return("huc12pp");

            case querysourceType.e_ssgage:
                return("ss_gages");

            case querysourceType.e_nwisgage:
                return("nwissite");

            default:
                return("");
            }
        }
Esempio n. 3
0
        internal FeatureCollection GetNavigateAsync(string startlocation, navigateType navigationMode = navigateType.e_downstream_main, Double?distance = null, querysourceType querysource = querysourceType.e_flowlines)
        {
            try
            {
                var reqInfo       = GetRequestInfo(nldiservicetype.e_navigate, new object[] { startlocation, getNavigateMode(navigationMode, querysource), distance?.ToString() ?? "" });
                var requestResult = this.ExecuteAsync <FeatureCollection>(reqInfo).Result;

                return(requestResult);
            }
            catch (Exception ex)
            {
                throw;
            }
        }