Esempio n. 1
0
        static void Main(string[] args)
        {
            var connector = new SentinelHubConnector();

            //Console.WriteLine(connector.GetWaterData(48.971527, 15.898574, 49.971527, 16.898574));
            //Console.WriteLine(connector.GetWaterData(47.697956,16.223885,48.697956,17.223885));
            //Console.WriteLine(connector.GetWaterData(40.8304, -8.7231, 40.6655, -8.72126));
            Console.WriteLine(connector.GetSentinel2BPosition()[1]);
        }
Esempio n. 2
0
        private void GetCoeficients(List <Airport> airports, string type)
        {
            foreach (Airport airport in airports)
            {
                var airportLon = Double.Parse(airport.lon, CultureInfo.InvariantCulture);
                var airportLat = Double.Parse(airport.lat, CultureInfo.InvariantCulture);

                var upperRightLon = airportLon + 0.5;
                var upperRightLat = airportLat + 0.5;

                var bottomLeftLon = airportLon - 0.5;
                var bottomLeftLat = airportLat - 0.5;

                if (upperRightLon > 180)
                {
                    upperRightLon -= 360;
                }
                if (upperRightLat > 90)
                {
                    upperRightLat -= 180;
                }

                if (bottomLeftLon < -180)
                {
                    bottomLeftLon += 360;
                }
                if (bottomLeftLat < -90)
                {
                    bottomLeftLat += 180;
                }
                // TODO create radius and serach if there is snow
                SentinelHubConnector sentinel = new SentinelHubConnector();

                switch (type)
                {
                case "SNOW":
                    airport.SnowCoeficient = sentinel.GetSnowData(bottomLeftLon, bottomLeftLat, upperRightLon, upperRightLat);
                    break;

                case "WATER":
                    airport.WaterCoeficient = sentinel.GetWaterData(bottomLeftLon, bottomLeftLat, upperRightLon, upperRightLat);
                    break;
                }
            }
            ;
        }
Esempio n. 3
0
        public ActionResult <IEnumerable <decimal> > Satellite()
        {
            SentinelHubConnector sentinel = new SentinelHubConnector();

            return(sentinel.GetSentinel2BPosition());
        }