help@rskworld.in +91 93305 39277
RSK World
  • Home
  • Development
    • Web Development
    • Mobile Apps
    • Software
    • Games
    • Project
  • Technologies
    • Data Science
    • AI Development
    • Cloud Development
    • Blockchain
    • Cyber Security
    • Dev Tools
    • Testing Tools
  • Blog
  • About
  • Contact

Theme Settings

Color Scheme
Display Options
Font Size
100%
Back to Project
RSK World
satellite-images
RSK World
satellite-images
Satellite Images Dataset - Land Cover Classification + Building Detection + Remote Sensing + Geospatial Analysis
satellite-images
  • __pycache__
  • data
  • visualizations
  • .gitignore780 B
  • ADVANCED_FEATURES.md7.2 KB
  • ATTRIBUTION.md1.5 KB
  • DATA_SUMMARY.md3.9 KB
  • DOWNLOAD_REAL_DATA_GUIDE.md3.4 KB
  • ERROR_FIXES_SUMMARY.md3.2 KB
  • GITHUB_RELEASE_INSTRUCTIONS.md4.9 KB
  • LICENSE1.2 KB
  • PROJECT_INFO.md3 KB
  • QUICK_DOWNLOAD_GUIDE.md2.1 KB
  • QUICK_START_ADVANCED.md2 KB
  • README.md8.1 KB
  • RELEASE_NOTES_v1.0.0.md7.1 KB
  • advanced_example.py11 KB
  • advanced_processing.py17.3 KB
  • advanced_visualization.py15.5 KB
  • batch_processing.py11.9 KB
  • batch_processor.py10.8 KB
  • check_errors.py6.9 KB
  • config.py1.1 KB
  • create_placeholder_image.py3.5 KB
  • create_sample_images.py5.3 KB
  • data_loader.py6 KB
  • download_real_images.py5 KB
  • download_real_satellite_data.py8.4 KB
  • download_with_landsatxplore.py4.6 KB
  • download_with_sentinelsat.py6 KB
  • enhanced_real_image_downloader.py17.8 KB
  • example_usage.py4.3 KB
  • generate_sample_data.py7.2 KB
  • get_real_satellite_data.py9.6 KB
  • index.html18.5 KB
  • ml_features.py11.8 KB
  • ml_integration.py13.6 KB
  • process_images.py7 KB
  • real_image_downloader.py15.7 KB
  • requirements.txt632 B
  • requirements_download.txt474 B
  • satellite-images.png2.6 MB
  • setup.py1.6 KB
  • visualize.py5.8 KB
download_with_sentinelsat.pyrequirements.txt
download_with_sentinelsat.py
Raw Download
Find: Go to:
#!/usr/bin/env python3
"""
Download Real Sentinel-2 Data using sentinelsat
Created by: RSK World
Website: https://rskworld.in
Email: help@rskworld.in
Phone: +91 93305 39277

This script downloads real Sentinel-2 satellite images.
Requires: pip install sentinelsat
"""

from sentinelsat import SentinelAPI, read_geojson, geojson_to_wkt
from pathlib import Path
import os
import json


def create_geojson_from_bounds(min_lon: float, min_lat: float, 
                               max_lon: float, max_lat: float,
                               output_file: str = "area.geojson"):
    """
    Create a GeoJSON file from bounding box coordinates.
    Created by: RSK World (https://rskworld.in)
    """
    geojson = {
        "type": "FeatureCollection",
        "features": [{
            "type": "Feature",
            "geometry": {
                "type": "Polygon",
                "coordinates": [[
                    [min_lon, min_lat],
                    [max_lon, min_lat],
                    [max_lon, max_lat],
                    [min_lon, max_lat],
                    [min_lon, min_lat]
                ]]
            }
        }]
    }
    
    with open(output_file, 'w') as f:
        json.dump(geojson, f)
    
    return output_file


def download_sentinel2_data(username: str, password: str,
                            min_lon: float = -122.5,
                            min_lat: float = 37.5,
                            max_lon: float = -122.0,
                            max_lat: float = 38.0,
                            start_date: str = '20230601',
                            end_date: str = '20230630',
                            max_cloud_cover: int = 10,
                            output_dir: str = "data/images"):
    """
    Download real Sentinel-2 data.
    Created by: RSK World (https://rskworld.in)
    
    Args:
        username: Copernicus Hub username
        password: Copernicus Hub password
        min_lon, min_lat, max_lon, max_lat: Bounding box coordinates
        start_date: Start date (YYYYMMDD)
        end_date: End date (YYYYMMDD)
        max_cloud_cover: Maximum cloud cover percentage
        output_dir: Directory to save images
    """
    print("Downloading Sentinel-2 Data")
    print("Created by: RSK World (https://rskworld.in)")
    print("=" * 50)
    
    # Initialize API
    try:
        api = SentinelAPI(username, password, 'https://scihub.copernicus.eu/dhus')
    except Exception as e:
        print(f"Error initializing API: {e}")
        print("Please check your credentials.")
        return
    
    # Create GeoJSON file for area
    geojson_file = create_geojson_from_bounds(min_lon, min_lat, max_lon, max_lat)
    area_wkt = geojson_to_wkt(read_geojson(geojson_file))
    
    print(f"Searching for Sentinel-2 products...")
    print(f"Area: ({min_lon}, {min_lat}) to ({max_lon}, {max_lat})")
    print(f"Date range: {start_date} to {end_date}")
    print(f"Max cloud cover: {max_cloud_cover}%")
    
    try:
        # Search for products
        products = api.query(
            area=area_wkt,
            date=(start_date, end_date),
            platformname='Sentinel-2',
            processinglevel='Level-2A',
            cloudcoverpercentage=(0, max_cloud_cover)
        )
        
        print(f"Found {len(products)} products")
        
        if not products:
            print("No products found. Try adjusting date range or area.")
            return
        
        # Create output directory
        output_path = Path(output_dir)
        output_path.mkdir(parents=True, exist_ok=True)
        
        # Download products
        for i, (product_id, product_info) in enumerate(list(products.items())[:5], 1):
            print(f"\n[{i}/{min(5, len(products))}] Downloading: {product_info['title']}")
            print(f"  Date: {product_info['beginposition']}")
            print(f"  Cloud cover: {product_info['cloudcoverpercentage']}%")
            
            try:
                api.download(product_id, directory_path=str(output_path))
                print(f"  [OK] Downloaded successfully")
            except Exception as e:
                print(f"  [ERROR] Download failed: {e}")
        
        print("\n" + "=" * 50)
        print("Download complete!")
        print(f"Images saved to: {output_path}")
        
        # Clean up GeoJSON file
        if Path(geojson_file).exists():
            os.remove(geojson_file)
        
    except Exception as e:
        print(f"Error searching for products: {e}")


def main():
    """
    Main function - requires user credentials.
    Created by: RSK World (https://rskworld.in)
    """
    print("=" * 60)
    print("Sentinel-2 Data Downloader")
    print("Created by: RSK World (https://rskworld.in)")
    print("=" * 60)
    print()
    print("This script requires:")
    print("1. Copernicus Hub account (free): https://scihub.copernicus.eu/")
    print("2. sentinelsat package: pip install sentinelsat")
    print()
    
    # Get credentials from environment or user input
    username = os.getenv('COPERNICUS_USERNAME')
    password = os.getenv('COPERNICUS_PASSWORD')
    
    if not username or not password:
        print("Please set COPERNICUS_USERNAME and COPERNICUS_PASSWORD environment variables,")
        print("or modify this script to enter credentials directly.")
        print()
        print("Example:")
        print("  export COPERNICUS_USERNAME='your_username'")
        print("  export COPERNICUS_PASSWORD='your_password'")
        print("  python download_with_sentinelsat.py")
        return
    
    # Download data for San Francisco area (matching sample metadata)
    download_sentinel2_data(
        username=username,
        password=password,
        min_lon=-122.5,
        min_lat=37.5,
        max_lon=-122.0,
        max_lat=38.0,
        start_date='20230601',
        end_date='20230630',
        max_cloud_cover=10
    )


if __name__ == "__main__":
    main()

182 lines•6 KB
python
requirements.txt
Raw Download
Find: Go to:
# Satellite Image Dataset - Requirements
# Created by: RSK World
# Website: https://rskworld.in
# Email: help@rskworld.in
# Phone: +91 93305 39277

# Core dependencies
numpy>=1.21.0
opencv-python>=4.5.0
rasterio>=1.2.0
matplotlib>=3.4.0
pillow>=8.3.0
scikit-image>=0.18.0
geopandas>=0.10.0
shapely>=1.8.0

# Advanced features
scikit-learn>=1.0.0
seaborn>=0.11.0
scipy>=1.7.0
tqdm>=4.62.0

# Real image downloading (optional)
# Uncomment to enable real image downloading features
# pystac-client>=0.7.0
# planetary-computer>=0.5.0
# landsatxplore>=0.6.0
# sentinelsat>=1.1.1
# earthengine-api>=0.1.350

31 lines•632 B
text

About RSK World

Founded by Molla Samser, with Designer & Tester Rima Khatun, RSK World is your one-stop destination for free programming resources, source code, and development tools.

Founder: Molla Samser
Designer & Tester: Rima Khatun

Development

  • Game Development
  • Web Development
  • Mobile Development
  • AI Development
  • Development Tools

Legal

  • Terms & Conditions
  • Privacy Policy
  • Disclaimer

Contact Info

Nutanhat, Mongolkote
Purba Burdwan, West Bengal
India, 713147

+91 93305 39277

hello@rskworld.in
support@rskworld.in

© 2026 RSK World. All rights reserved.

Content used for educational purposes only. View Disclaimer