//Photos are omitted if the longitude is not in the range [0, 5.4] and the latitude is in [43.6,50.0].
        public IPhoto CreatePhoto()
        {
            PhotMetadata hehe;

            hehe = shutterStockIterator.Next();
            while (hehe.Longitude < 0 || hehe.Longitude > 5.4 || hehe.Latitude < 43.6 || hehe.Latitude > 50.0)
            {
                hehe = shutterStockIterator.Next();
            }
            ShutterStockCodec stockCodec = new ShutterStockCodec();
            string            height     = stockCodec.Decrypt(hehe.HeightPx);
            string            width      = stockCodec.Decrypt(hehe.WidthPx);
            Photo             photo      = new Photo(hehe.Name, height, width);

            return(photo);
        }
Esempio n. 2
0
        //Photos are omitted if the longitude is not in the range [8.8,15.2] and the latitude is in [37.7,44.0].
        public IPhoto CreatePhoto()
        {
            PhotMetadata hehe;

            hehe = shutterStockIterator.Next();
            while (hehe.Longitude < 8.8 || hehe.Longitude > 15.2 || hehe.Latitude < 37.7 || hehe.Latitude > 44.0)
            {
                hehe = shutterStockIterator.Next();
            }
            ShutterStockCodec stockCodec = new ShutterStockCodec();
            string            height     = stockCodec.Decrypt(hehe.HeightPx);
            string            width      = stockCodec.Decrypt(hehe.WidthPx);
            Photo             photo      = new Photo(hehe.Name, height, width);
            ItalianPhoto      itphoto    = new ItalianPhoto();

            itphoto.SetComponent(photo);
            return(itphoto);
        }
        //Photos are omitted if the longitude (Longitude) is not in the range [14.4,23.5] and the latitude (Latitude) in [49.8,54.2].
        public IPhoto CreatePhoto()
        {
            PhotMetadata hehe;

            hehe = shutterStockIterator.Next();
            while (hehe.Latitude < 49.8 || hehe.Latitude > 54.2 || hehe.Longitude < 14.4 || hehe.Longitude > 23.5)
            {
                hehe = shutterStockIterator.Next();
            }
            ShutterStockCodec stockCodec = new ShutterStockCodec();
            string            height     = stockCodec.Decrypt(hehe.HeightPx);
            string            width      = stockCodec.Decrypt(hehe.WidthPx);
            Photo             photo      = new Photo(hehe.Name, height, width);
            PolishPhoto       plphoto    = new PolishPhoto();

            plphoto.SetComponent(photo);
            return(plphoto);
        }