Spaces:
Sleeping
Sleeping
| <html lang="en" data-bs-theme="dark"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>ForestAI - Image to GeoJSON Processing</title> | |
| <!-- Bootstrap CSS (Replit-themed) --> | |
| <link rel="stylesheet" href="https://cdn.replit.com/agent/bootstrap-agent-dark-theme.min.css"> | |
| <!-- Leaflet CSS --> | |
| <link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" | |
| integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=" | |
| crossorigin=""/> | |
| <!-- Font Awesome for icons --> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <!-- Custom CSS --> | |
| <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}"> | |
| </head> | |
| <body> | |
| <nav class="navbar navbar-expand-lg navbar-dark bg-dark"> | |
| <div class="container-fluid"> | |
| <a class="navbar-brand" href="#"> | |
| <i class="fas fa-tree"></i> ForestAI | |
| </a> | |
| <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"> | |
| <span class="navbar-toggler-icon"></span> | |
| </button> | |
| <div class="collapse navbar-collapse" id="navbarNav"> | |
| <ul class="navbar-nav"> | |
| <li class="nav-item"> | |
| <a class="nav-link active" href="#">Home</a> | |
| </li> | |
| <li class="nav-item"> | |
| <a class="nav-link" href="#about">About</a> | |
| </li> | |
| </ul> | |
| </div> | |
| </div> | |
| </nav> | |
| <div class="container mt-4"> | |
| <div class="row"> | |
| <div class="col-md-12"> | |
| <div class="card"> | |
| <div class="card-header"> | |
| <h2><i class="fas fa-image"></i> Image to GeoJSON Processing Pipeline</h2> | |
| </div> | |
| <div class="card-body"> | |
| <p class="lead"> | |
| Upload an image to process and visualize as GeoJSON on a map. | |
| </p> | |
| <div class="alert alert-info"> | |
| <i class="fas fa-info-circle"></i> Supported formats: PNG, JPG, TIFF | |
| </div> | |
| <form id="uploadForm" class="mb-4"> | |
| <div class="mb-3"> | |
| <label for="imageFile" class="form-label">Select Image File</label> | |
| <input class="form-control" type="file" id="imageFile" accept=".png,.jpg,.jpeg,.tif,.tiff"> | |
| </div> | |
| <div class="mb-3"> | |
| <label for="featureType" class="form-label">Feature Type to Extract</label> | |
| <select class="form-select" id="featureType" name="feature_type"> | |
| <option value="buildings" selected>Buildings</option> | |
| <option value="trees">Trees/Vegetation</option> | |
| <option value="water">Water Bodies</option> | |
| <option value="roads">Roads</option> | |
| </select> | |
| <div class="form-text">Select the type of features you want to extract from the image.</div> | |
| </div> | |
| <button type="submit" class="btn btn-primary"> | |
| <i class="fas fa-upload"></i> Upload & Process | |
| </button> | |
| </form> | |
| <!-- Processing status --> | |
| <div id="processingStatus" class="d-none"> | |
| <div class="d-flex align-items-center"> | |
| <div class="spinner-border text-primary me-2" role="status"> | |
| <span class="visually-hidden">Loading...</span> | |
| </div> | |
| <span>Processing image, please wait...</span> | |
| </div> | |
| </div> | |
| <!-- Error message display --> | |
| <div id="errorMessage" class="alert alert-danger d-none"></div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Results Section (initially hidden) --> | |
| <div id="resultsSection" class="row mt-4 d-none"> | |
| <div class="col-md-12"> | |
| <div class="card"> | |
| <div class="card-header"> | |
| <h3><i class="fas fa-map"></i> Processing Results</h3> | |
| </div> | |
| <div class="card-body"> | |
| <div class="row"> | |
| <div class="col-md-12 mb-3"> | |
| <div id="map" style="height: 500px;"></div> | |
| </div> | |
| </div> | |
| <div class="row mt-3"> | |
| <div class="col-md-12"> | |
| <div class="d-flex justify-content-between"> | |
| <div> | |
| <h4>GeoJSON Data</h4> | |
| </div> | |
| <div> | |
| <button id="downloadBtn" class="btn btn-success"> | |
| <i class="fas fa-download"></i> Download GeoJSON | |
| </button> | |
| </div> | |
| </div> | |
| <div class="mt-2"> | |
| <pre id="geojsonDisplay" class="bg-dark text-light p-3" style="max-height: 300px; overflow-y: auto;"></pre> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- About Section --> | |
| <div id="about" class="row mt-4"> | |
| <div class="col-md-12"> | |
| <div class="card"> | |
| <div class="card-header"> | |
| <h3><i class="fas fa-info-circle"></i> About This Tool</h3> | |
| </div> | |
| <div class="card-body"> | |
| <p> | |
| This application provides an image processing pipeline that converts uploaded images to | |
| GeoJSON data and visualizes it on a map. It uses advanced algorithms to detect features | |
| in satellite or aerial imagery and represent them as geographic vector data. | |
| </p> | |
| <h4>Features:</h4> | |
| <ul> | |
| <li>Upload and process various image formats</li> | |
| <li>Automatic feature detection and extraction</li> | |
| <li>Conversion to standard GeoJSON format</li> | |
| <li>Interactive map visualization</li> | |
| <li>Download processed GeoJSON data</li> | |
| </ul> | |
| <h4>How It Works:</h4> | |
| <ol> | |
| <li>Upload an image (satellite imagery, aerial photos, etc.)</li> | |
| <li>Our system processes the image using computer vision techniques</li> | |
| <li>Features are detected and converted to geographic coordinates</li> | |
| <li>Results are displayed on an interactive map and available for download</li> | |
| </ol> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <footer class="bg-dark text-light py-4 mt-5"> | |
| <div class="container"> | |
| <div class="row"> | |
| <div class="col-md-6"> | |
| <h5><i class="fas fa-tree"></i> ForestAI</h5> | |
| <p>Image processing pipeline for geospatial data</p> | |
| </div> | |
| <div class="col-md-6 text-md-end"> | |
| <p>© 2023 ForestAI</p> | |
| </div> | |
| </div> | |
| </div> | |
| </footer> | |
| <!-- Bootstrap JS Bundle with Popper --> | |
| <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script> | |
| <!-- Leaflet JS --> | |
| <script src="https://unpkg.com/[email protected]/dist/leaflet.js" | |
| integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=" | |
| crossorigin=""></script> | |
| <!-- Custom JS --> | |
| <script src="{{ url_for('static', filename='js/map.js') }}"></script> | |
| <script src="{{ url_for('static', filename='js/upload.js') }}"></script> | |
| </body> | |
| </html> | |