Ejemplo n.º 1
0
        public float Get(string lat,
                         string lng,
                         int province_id,
                         int amphur_code,
                         int well,
                         int road,
                         int shape,
                         int width,
                         int type_size,
                         int distance,
                         int appraisal,
                         int size)
        {
            SearchPlace sp           = new SearchPlace();
            var         search       = sp.getPlace(lat, lng);
            int         a            = appraisal;
            float       area         = size;
            var         nearby_parse = float.Parse(search, CultureInfo.InvariantCulture.NumberFormat);
            var         weight_fac   = sp.getWeight(province_id, amphur_code, well, road, shape, width, type_size, distance);
            var         wf_parse     = float.Parse(weight_fac, CultureInfo.InvariantCulture.NumberFormat);
            var         weight_road  = sp.getRoad();
            var         wr_parse     = float.Parse(weight_road, CultureInfo.InvariantCulture.NumberFormat);
            var         sums         = (wf_parse * a) + (nearby_parse * a) + (wr_parse * a);
            var         total        = sums * area;

            return(total);
        }
Ejemplo n.º 2
0
        public float Get(string lat, string lng)
        {
            SearchPlace sp           = new SearchPlace();
            var         search       = sp.getPlace(lat, lng);
            int         a            = 2000;
            float       area         = 60;
            var         nearby_parse = float.Parse(search, CultureInfo.InvariantCulture.NumberFormat);
            //var weight_fac = sp.getWeight();
            //var wf_parse = float.Parse(weight_fac, CultureInfo.InvariantCulture.NumberFormat);
            var weight_road = sp.getRoad();
            var wr_parse    = float.Parse(weight_road, CultureInfo.InvariantCulture.NumberFormat);
            var sums        = (nearby_parse * a) + (wr_parse * a);
            var total       = sums * area;

            return(sums);
        }