Пример #1
0
 public SymbolParameters()
 {
     _tm = Int32.Parse((ReadConfigFile.ReadModelConfiguration("TM") != "") ? ReadConfigFile.ReadModelConfiguration("TM") : "");
     _uniquenessThresh       = Double.Parse((ReadConfigFile.ReadModelConfiguration("UniguenessThresh") != "") ? ReadConfigFile.ReadModelConfiguration("UniguenessThresh") : "");
     _hessianThress          = Int32.Parse((ReadConfigFile.ReadModelConfiguration("HessianThresh") != "") ? ReadConfigFile.ReadModelConfiguration("HessianThresh") : "");
     _histogramMatchingScore = Double.Parse((ReadConfigFile.ReadModelConfiguration("HistogramMatchingScore") != "") ? ReadConfigFile.ReadModelConfiguration("HistogramMatchingScore") : "");
 }
Пример #2
0
        public static string URLBuilder()
        {
            _version        = (ReadConfigFile.ReadModelConfiguration("Version") != "") ? ReadConfigFile.ReadModelConfiguration("Version") : "";
            _service        = (ReadConfigFile.ReadModelConfiguration("SERVICE") != "") ? ReadConfigFile.ReadModelConfiguration("SERVICE") : "";
            _request        = (ReadConfigFile.ReadModelConfiguration("Request") != "") ? ReadConfigFile.ReadModelConfiguration("Request") : "";
            _srs            = (ReadConfigFile.ReadModelConfiguration("SRS") != "") ? ReadConfigFile.ReadModelConfiguration("SRS") : "";
            _format         = (ReadConfigFile.ReadModelConfiguration("FORMAT") != "") ? ReadConfigFile.ReadModelConfiguration("FORMAT") : "";
            _dpi            = (ReadConfigFile.ReadModelConfiguration("DPI") != "") ? ReadConfigFile.ReadModelConfiguration("DPI") : "";
            _map_resolution = (ReadConfigFile.ReadModelConfiguration("MAP_RESOLUTION") != "") ? ReadConfigFile.ReadModelConfiguration("MAP_RESOLUTION") : "";
            _format_option  = (ReadConfigFile.ReadModelConfiguration("FORMAT_OPTIONS") != "") ? ReadConfigFile.ReadModelConfiguration("FORMAT_OPTIONS") : "";
            _transparent    = (ReadConfigFile.ReadModelConfiguration("TRANSPARENT") != "") ? ReadConfigFile.ReadModelConfiguration("TRANSPARENT") : "";
            _styles         = (ReadConfigFile.ReadModelConfiguration("STYLES") != "") ? ReadConfigFile.ReadModelConfiguration("STYLES") : "";



            if ((ReadConfigFile.ReadModelConfiguration(_layers + ":URL")) != null)
            {
                _url         = (ReadConfigFile.ReadModelConfiguration(_layers + ":URL") != "") ? ReadConfigFile.ReadModelConfiguration(_layers + ":URL") : "";
                _width       = (ReadConfigFile.ReadModelConfiguration(_layers + ":Width") != "") ? ReadConfigFile.ReadModelConfiguration(_layers + ":Width") : "";
                _height      = (ReadConfigFile.ReadModelConfiguration(_layers + ":Height") != "") ? ReadConfigFile.ReadModelConfiguration(_layers + ":Height") : "";
                _meterWidth  = (ReadConfigFile.ReadModelConfiguration(_layers + ":WIDTHMeter") != "") ? int.Parse(ReadConfigFile.ReadModelConfiguration(_layers + ":WIDTHMeter")) : 0;
                _meterHeight = (ReadConfigFile.ReadModelConfiguration(_layers + ":HEIGHTMeter") != "") ? int.Parse(ReadConfigFile.ReadModelConfiguration(_layers + ":HEIGHTMeter")) : 0;
                _srid        = (ReadConfigFile.ReadModelConfiguration(_layers + ":srid") != "") ? (ReadConfigFile.ReadModelConfiguration(_layers + ":srid")) : "";
            }
            else
            {
                _url         = (ReadConfigFile.ReadModelConfiguration("URL") != "") ? ReadConfigFile.ReadModelConfiguration("URL") : "";
                _width       = (ReadConfigFile.ReadModelConfiguration("WIDTH") != "") ? ReadConfigFile.ReadModelConfiguration("WIDTH") : "";
                _height      = (ReadConfigFile.ReadModelConfiguration("HEIGHT") != "") ? ReadConfigFile.ReadModelConfiguration("HEIGHT") : "";
                _meterWidth  = (ReadConfigFile.ReadModelConfiguration("WIDTHMeter") != "") ? int.Parse(ReadConfigFile.ReadModelConfiguration("WIDTHMeter")) : 0;
                _meterHeight = (ReadConfigFile.ReadModelConfiguration("HEIGHTMeter") != "") ? int.Parse(ReadConfigFile.ReadModelConfiguration("HEIGHTMeter")) : 0;
                _srid        = (ReadConfigFile.ReadModelConfiguration("srid") != "") ? (ReadConfigFile.ReadModelConfiguration("srid")) : "";
            }


            string e, n, s, w;

            e      = n = w = s = "";
            _bBOXE = (Int32.Parse(_bBOXW) + _meterWidth).ToString();
            _bBOXS = (Int32.Parse(_bBOXN) - _meterHeight).ToString();

            if (_bBOXE != null && _bBOXN != null && _bBOXS != null && _bBOXW != null)
            {
                s = _bBOXS; n = _bBOXN; w = _bBOXW; e = _bBOXE;
            }


            return(_targetURL = _url.Trim() + "&&SERVICE=" + _service.Trim() + "&VERSION=" + _version.Trim() + "&REQUEST=" + _request.Trim() + "&BBOX=" + w.Trim() + "," +
                                s.Trim() + "," + e.Trim() + "," + n.Trim() + "&SRS=" + _srs.Trim() + "&WIDTH=" + _width.Trim() + "&HEIGHT=" + _height.Trim() + "&LAYERS=" + _layers.Trim() +
                                "&STYLES=" + _styles.Trim() + "&FORMAT=" + _format.Trim() + "&DPI=" + _dpi.Trim() + "&MAP_RESOLUTION=" + _map_resolution.Trim() + "&FORMAT_OPTIONS=" + _format_option.Trim() +
                                "&TRANSPARENT=" + _transparent.Trim());
        }