Skip to content

ODM: Improve error message when files lack GPS EXIF data #223

Description

@JesJehle

Problem

When users upload pre-processed orthomosaics or tiles (instead of raw drone images) to the ODM pipeline, the error message is confusing:

ODM processing failed with exit code 1
Images directory contains 0 image files: []

This is misleading because:

  • Files DO exist in the directory (45+ TIFF files)
  • They ARE valid image files (TIFF format)
  • But they're NOT valid drone images (missing GPS EXIF data required by ODM)

Impact

  • Users are confused about why processing failed
  • Wastes support time investigating "missing files"
  • Users retry the same invalid upload multiple times
  • Recent example: 4 datasets from same user (6226, 6227, 6228, 6258)

Root Cause

ODM's error "0 image files" means "0 images with valid GPS EXIF data", not "0 files found". Our error logging doesn't clarify this distinction.

Proposed Solution

File: processor/src/process_odm.py

After ODM fails, detect the specific failure reason and provide actionable error messages:

# After ODM container exits with error
if odm_exit_code == 1:
    # Check if files exist but lack EXIF GPS
    image_files = list(images_dir.glob('*.{jpg,jpeg,tif,tiff}'))
    
    if len(image_files) > 0:
        # Files exist but ODM rejected them
        has_gps_exif = check_gps_exif_in_images(image_files)
        
        if not has_gps_exif:
            raise ValueError(
                f"ODM rejected {len(image_files)} image files due to missing GPS EXIF metadata. "
                f"ODM requires raw drone images with GPS coordinates embedded in EXIF data. "
                f"Your files appear to be pre-processed tiles or orthomosaics. "
                f"\n\nTo upload pre-processed data: Use 'Upload GeoTIFF' instead of 'Upload Raw Images'."
                f"\nTo use ODM: Upload original drone photos from your flight (typically .JPG files with GPS)."
            )

Acceptance Criteria

  • Error message clearly states files were rejected due to missing GPS EXIF
  • Error message explains the difference between raw drone images and processed tiles
  • Error message guides users to correct upload method (GeoTIFF vs Raw Images)
  • Test with pre-processed tiles (should show clear error)
  • Test with raw drone images (should succeed as normal)

Related

  • See also: Frontend validation issue (to prevent this at upload time)
  • Affected datasets: 6226, 6227, 6228, 6258
  • User: [user email redacted]

Priority

Medium - improves UX but workaround exists (user support can explain)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions