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
stay_by_outcome.pngcharges_by_treatment.pngvideo_metadata.jsonsatellite-images.pngage_charges_outcome.pngrequirements_download.txtmonthly_admissions.pngdownload_with_landsatxplore.pysample.mp4download_real_images.py
satellite-images.png
Open Download
satellite-images.png

satellite-images.png

Size: 2.6 MB

requirements_download.txt
Raw Download
Find: Go to:
# Additional Requirements for Downloading Real Satellite Data
# Created by: RSK World
# Website: https://rskworld.in
# Email: help@rskworld.in
# Phone: +91 93305 39277

# For Landsat data
landsatxplore>=0.6.0

# For Sentinel-2 data
sentinelsat>=1.1.1

# For Google Earth Engine
earthengine-api>=0.1.350

# For Planetary Computer
pystac-client>=0.7.0
planetary-computer>=0.5.0

# Additional utilities
geopandas>=0.13.0
shapely>=2.0.0
rasterio>=1.3.0

25 lines•474 B
text
download_with_landsatxplore.py
Raw Download
Find: Go to:
#!/usr/bin/env python3
"""
Download Real Landsat Data using landsatxplore
Created by: RSK World
Website: https://rskworld.in
Email: help@rskworld.in
Phone: +91 93305 39277

This script downloads real Landsat satellite images.
Requires: pip install landsatxplore
"""

from landsatxplore.api import API
from pathlib import Path
import os


def download_landsat_data(username: str, password: str, 
                         latitude: float = 37.7749, 
                         longitude: float = -122.4194,
                         start_date: str = '2023-01-01',
                         end_date: str = '2023-12-31',
                         max_cloud_cover: int = 10,
                         output_dir: str = "data/images"):
    """
    Download real Landsat data.
    Created by: RSK World (https://rskworld.in)
    
    Args:
        username: USGS EarthExplorer username
        password: USGS EarthExplorer password
        latitude: Latitude of area of interest
        longitude: Longitude of area of interest
        start_date: Start date (YYYY-MM-DD)
        end_date: End date (YYYY-MM-DD)
        max_cloud_cover: Maximum cloud cover percentage
        output_dir: Directory to save images
    """
    print("Downloading Landsat Data")
    print("Created by: RSK World (https://rskworld.in)")
    print("=" * 50)
    
    # Initialize API
    try:
        api = API(username, password)
    except Exception as e:
        print(f"Error initializing API: {e}")
        print("Please check your credentials.")
        return
    
    # Search for scenes
    print(f"Searching for Landsat scenes near ({latitude}, {longitude})...")
    print(f"Date range: {start_date} to {end_date}")
    print(f"Max cloud cover: {max_cloud_cover}%")
    
    try:
        scenes = api.search(
            dataset='landsat_ot_c2_l2',  # Landsat 8-9 Collection 2 Level 2
            latitude=latitude,
            longitude=longitude,
            start_date=start_date,
            end_date=end_date,
            max_cloud_cover=max_cloud_cover,
            max_results=10
        )
        
        print(f"Found {len(scenes)} scenes")
        
        if not scenes:
            print("No scenes found. Try adjusting date range or location.")
            return
        
        # Create output directory
        output_path = Path(output_dir)
        output_path.mkdir(parents=True, exist_ok=True)
        
        # Download scenes
        for i, scene in enumerate(scenes[:5], 1):  # Download first 5 scenes
            print(f"\n[{i}/{min(5, len(scenes))}] Downloading: {scene['display_id']}")
            print(f"  Date: {scene['acquisition_date']}")
            print(f"  Cloud cover: {scene['cloud_cover']}%")
            
            try:
                api.download(scene['entity_id'], output_dir=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}")
        
    except Exception as e:
        print(f"Error searching for scenes: {e}")
    finally:
        api.logout()


def main():
    """
    Main function - requires user credentials.
    Created by: RSK World (https://rskworld.in)
    """
    print("=" * 60)
    print("Landsat Data Downloader")
    print("Created by: RSK World (https://rskworld.in)")
    print("=" * 60)
    print()
    print("This script requires:")
    print("1. USGS EarthExplorer account (free): https://earthexplorer.usgs.gov/")
    print("2. landsatxplore package: pip install landsatxplore")
    print()
    
    # Get credentials from environment or user input
    username = os.getenv('USGS_USERNAME')
    password = os.getenv('USGS_PASSWORD')
    
    if not username or not password:
        print("Please set USGS_USERNAME and USGS_PASSWORD environment variables,")
        print("or modify this script to enter credentials directly.")
        print()
        print("Example:")
        print("  export USGS_USERNAME='your_username'")
        print("  export USGS_PASSWORD='your_password'")
        print("  python download_with_landsatxplore.py")
        return
    
    # Download data for San Francisco area (matching sample metadata)
    download_landsat_data(
        username=username,
        password=password,
        latitude=37.7749,  # San Francisco
        longitude=-122.4194,
        start_date='2023-06-01',
        end_date='2023-06-30',
        max_cloud_cover=10
    )


if __name__ == "__main__":
    main()

143 lines•4.6 KB
python
download_real_images.py
Raw Download
Find: Go to:
#!/usr/bin/env python3
"""
Automated Real Satellite Data Download
Created by: RSK World (https://rskworld.in)
"""

import pystac_client
import planetary_computer
from pathlib import Path
import requests
from PIL import Image
import io
from datetime import datetime, timedelta

def download_satellite_images(num_images=10, output_dir="data/images"):
    """
    Download real satellite images from Planetary Computer.
    Created by: RSK World (https://rskworld.in)
    """
    print("Downloading Real Satellite Images")
    print("Created by: RSK World (https://rskworld.in)")
    print("=" * 60)
    
    # Create output directory
    output_path = Path(output_dir)
    output_path.mkdir(parents=True, exist_ok=True)
    
    # Open catalog
    catalog = pystac_client.Client.open(
        "https://planetarycomputer.microsoft.com/api/stac/v1",
        modifier=planetary_computer.sign_inplace,
    )
    
    # Different locations for variety
    locations = [
        {"bbox": [-122.5, 37.5, -122.0, 38.0], "name": "San Francisco"},
        {"bbox": [-74.0, 40.6, -73.9, 40.7], "name": "New York"},
        {"bbox": [2.2, 48.8, 2.4, 48.9], "name": "Paris"},
        {"bbox": [139.6, 35.6, 139.8, 35.7], "name": "Tokyo"},
        {"bbox": [-0.2, 51.4, 0.0, 51.5], "name": "London"},
    ]
    
    downloaded = 0
    date_start = datetime(2023, 6, 1)
    date_end = datetime(2023, 12, 31)
    
    for i in range(num_images):
        location = locations[i % len(locations)]
        
        try:
            # Search for Sentinel-2 data with wider date range
            search = catalog.search(
                collections=["sentinel-2-l2a"],
                bbox=location["bbox"],
                datetime=f"{date_start.strftime('%Y-%m-%d')}/{date_end.strftime('%Y-%m-%d')}",
                query={"eo:cloud_cover": {"lt": 30}},
                limit=10  # Get more results to choose from
            )
            
            items = list(search.item_collection())
            if items:
                # Try to get a unique item (skip if we already downloaded from this location)
                item = items[i % len(items)] if len(items) > i else items[0]
                
                # Try visual asset first, then fallback to other assets
                asset = item.assets.get("visual") or item.assets.get("rendered_preview")
                
                if asset:
                    # Sign the URL
                    href = planetary_computer.sign(asset.href)
                    
                    # Download image
                    print(f"[{i+1}/{num_images}] Downloading from {location['name']}...")
                    print(f"  Date: {item.properties.get('datetime', 'N/A')}")
                    print(f"  Cloud cover: {item.properties.get('eo:cloud_cover', 'N/A')}%")
                    
                    try:
                        response = requests.get(href, timeout=60, stream=True)
                        
                        if response.status_code == 200:
                            # Read image data
                            img_data = response.content
                            img = Image.open(io.BytesIO(img_data))
                            
                            # Convert to RGB if needed
                            if img.mode != 'RGB':
                                img = img.convert('RGB')
                            
                            # Resize to 512x512 if needed
                            if img.size != (512, 512):
                                img = img.resize((512, 512), Image.Resampling.LANCZOS)
                            
                            # Save as PNG
                            output_file = output_path / f"sample_{i+1:03d}.png"
                            img.save(output_file, 'PNG')
                            print(f"  [OK] Saved: {output_file}")
                            downloaded += 1
                        else:
                            print(f"  [ERROR] Download failed: HTTP {response.status_code}")
                    except Exception as e:
                        print(f"  [ERROR] Download error: {e}")
                else:
                    print(f"  [SKIP] No visual asset available for this item")
            else:
                print(f"  [SKIP] No images found for {location['name']}")
                
        except Exception as e:
            print(f"  [ERROR] {e}")
            continue
    
    print()
    print("=" * 60)
    print(f"Download complete! {downloaded}/{num_images} images downloaded.")
    print(f"Images saved to: {output_path}")
    print("=" * 60)

if __name__ == "__main__":
    # Install required packages first:
    # pip install pystac-client planetary-computer requests pillow
    
    try:
        download_satellite_images(num_images=10)
    except ImportError as e:
        print("ERROR: Missing required package.")
        print("Please install: pip install pystac-client planetary-computer requests pillow")
        print(f"Details: {e}")
127 lines•5 KB
python

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