Exemplo n.º 1
0
        public void ByDistanceFromLatLong(double[] lonlat, double ele)
        {
            stations = StationGrouping.getAllStationsFromDB(db);
            var siteCoord = new GeoCoordinate(lonlat[1], lonlat[0]);

            double dist = 0;

            double eleDiff = 0;

            StationGroup sg = new StationGroup();

            sg.name = "sumapaz";
            foreach (int actScode in activeStationCodes)
            {
                //get the ref station details

                //find within radius altitude

                if (stations.Exists(x => x.code == actScode))
                {
                    Station s      = stations.Find(x => x.code == actScode);
                    var     sCoord = new GeoCoordinate(s.latitude, s.longitude);
                    dist    = siteCoord.GetDistanceTo(sCoord);
                    eleDiff = ele - s.elevation;
                    if (dist < 20000)//&& Math.Abs(eleDiff) < 100
                    {
                        sg.stationcodes.Add(s.code);
                    }
                }
            }
            CityYearBuilder cyb = new CityYearBuilder();

            cyb.prepOneGroup(sg);
            cyb.makeSynthYear(sg, "medianHour");
        }
Exemplo n.º 2
0
        private void syntheticYear(object sender, EventArgs e)
        {
            CityYearBuilder cyb = new CityYearBuilder();

            cyb.syntheticYearBatchFixer("medianHour");
            //cyb.syntheticYearBatch("medianHour");
            //cyb.syntheticYearDataPrep("regionGroups");
            //cyb.syntheticYearBatch("meanHour");
            //cyb.syntheticYearBatch("randomHour");
            //cyb.syntheticYearBatch("cdfDay");
        }
Exemplo n.º 3
0
        private void readSyntheticYear(object sender, EventArgs e)
        {
            CityYearBuilder cyb = new CityYearBuilder();

            cyb.readSythYearFromDB();
        }
Exemplo n.º 4
0
        public void writeToEPW()
        {
            CityYearBuilder cyb = new CityYearBuilder();

            cyb.writeEPW("sumapaz", 3.858849, -74.301720, 3500);
        }