ADMA System Documentation
Welcome to the Agricultural Data Management & Analytics (ADMA) system documentation. This comprehensive guide covers all aspects of the platform designed for managing, visualizing, and analyzing agricultural data.
File Management
Upload, organize, and manage files with hierarchical folder structures and advanced metadata handling.
GIS Integration
Visualize spatial data with integrated GeoServer, supporting multiple coordinate systems and file formats.
Data Sharing
Share files and folders publicly or privately with granular access controls and collaboration features.
Third-Party Integration
Automatic sync with John Deere Operations Center and Realm5 weather stations for comprehensive farm data.
Analysis Tools
Specialized agricultural analysis tools including seeding analysis, format conversion, and spectral indices.
Custom Maps
Create multi-layer maps by combining GIS files for comprehensive spatial visualization and analysis.
Key Features
Getting Started
System Requirements
| Component | Requirement | Notes |
|---|---|---|
| Web Browser | Chrome 90+, Firefox 88+, Safari 14+ | JavaScript must be enabled |
| Internet Connection | Broadband recommended | For file uploads and map tiles |
| Screen Resolution | 1024x768 minimum | Responsive design supports mobile |
User Registration & Login
File Management
Supported File Types
GIS Files
- GeoPackage (.gpkg) - Complete spatial databases
- GeoJSON (.geojson) - Vector data format
- ESRI Shapefile (.shp + components) - Industry standard vector format
- KML/KMZ (.kml, .kmz) - Google Earth formats
- GeoTIFF (.tif, .tiff) - Raster data with georeference
- CSV with coordinates - Tabular spatial data
- 3D Tiles - 3D visualization data
General Files
- Documents: PDF, DOC, DOCX, TXT, MD
- Spreadsheets: XLS, XLSX, CSV
- Images: JPG, PNG, GIF, BMP, SVG
- Archives: ZIP, RAR, 7Z
- Videos: MP4, AVI, MOV
- Other: JSON, XML, LOG
File Upload Methods
Individual File Upload
Folder Upload
File Operations
| Operation | Location | Description |
|---|---|---|
| Download | File actions menu (⋮) | Download original file to your device |
| Delete | File actions menu (⋮) | Permanently remove file from system |
| View Details | Click file name | See metadata, properties, and spatial information |
| Toggle Visibility | File detail page | Switch between public and private access |
| View on Map | File actions menu (⋮) | Visualize GIS files on interactive map |
Duplicate File Handling
When uploading files with names that already exist, the system automatically renames them:
Folder Management
Folder Operations
Creating Folders
Folder Hierarchy
ADMA supports unlimited nested folder structures:
Navigation Features
- Breadcrumb Navigation: Shows current location path with clickable links
- Folder Statistics: Displays file count and subfolder count for each folder
- View Modes: Toggle between list view and panel view for optimal browsing
- Pagination: Large folders display 100 items per page with navigation controls
Duplicate Folder Handling
When creating or uploading folders with existing names:
- Entire folder structure is renamed (not merged)
- Original folder contents remain unchanged
- New folder gets incremental suffix:
MyFolder→MyFolder_1 - All files within renamed folders maintain their original names
GIS Features
Automatic GIS Processing
ADMA automatically detects and processes GIS files upon upload:
Supported Coordinate Systems
| EPSG Code | Name | Usage |
|---|---|---|
| EPSG:4326 | WGS 84 | Global geographic coordinates (lat/lon) |
| EPSG:3857 | Web Mercator | Web mapping applications |
| EPSG:32614 | UTM Zone 14N | Nebraska region projections |
| Custom | Auto-detected | System detects and handles various projections |
GIS File Status
| Status | Description | Actions Available |
|---|---|---|
| Pending | File uploaded, queued for processing | View details |
| Processing | File being analyzed and prepared | View details |
| Processed | Analysis complete, ready for publishing | View details, manual publish |
| Published | Available in GeoServer for visualization | View details, view on map |
| Error | Processing failed | View error log, retry |
Shapefile Processing
Shapefiles require multiple component files and receive special handling:
- Required Components: .shp, .shx, .dbf files must all be present
- Optional Components: .prj (projection), .cpg (encoding), .sbn/.sbx (spatial index)
- Automatic Bundling: System groups scattered components and creates proper shapefile packages
- Layer Naming: Published layers use original shapefile name for consistency
Map Visualization
Map Interface Features
Base Layers
- OpenStreetMap (default)
- Satellite imagery
- Topographic maps
- Custom base layers
Map Controls
- Zoom in/out controls
- Pan and navigate
- Full screen mode
- Layer selector dropdown
Data Visualization
ADMA uses OpenLayers for robust map visualization with the following capabilities:
- Vector Data: Points, lines, and polygons from shapefiles and GeoJSON
- Raster Data: Satellite imagery, DEMs, and analytical rasters from GeoTIFF
- Dynamic Extent: Map automatically zooms to data bounds
- Coordinate Transformation: Automatic reprojection to web display coordinates
- Attribution: Proper data source attribution displayed
Map Information Panel
The right sidebar provides detailed information:
User Management
User Roles & Permissions
| Permission | Owner | Public User | Anonymous User |
|---|---|---|---|
| Upload files/folders | ✅ | ✅ (own content) | ❌ |
| Create folders | ✅ | ✅ (own content) | ❌ |
| Delete content | ✅ (own content) | ✅ (own content) | ❌ |
| View public content | ✅ | ✅ | ✅ |
| View private content | ✅ (own content) | ❌ | ❌ |
| Toggle visibility | ✅ (own content) | ✅ (own content) | ❌ |
User Dashboard
Each authenticated user has access to a personalized dashboard featuring:
- File Statistics: Total files, folders, storage used, public files count
- Quick Actions: Create folder, upload folders, upload files
- Recent Files: Latest uploaded or modified files
- Folder Navigation: Browse personal folder hierarchy
- View Toggle: Switch between list and panel view modes
Admin Features
System administrators have additional capabilities through Django Admin:
- User account management
- System-wide file and folder management
- GeoServer configuration
- Database maintenance and monitoring
- Celery task monitoring
Public Sharing
Visibility Settings
All files and folders can be set as either public or private:
Private Content
- Visible only to owner
- Requires authentication
- Not indexed in public listings
- Direct URLs return 404 for others
Public Content
- Accessible to anyone
- Listed on public home page
- Shareable via direct links
- Viewable without authentication
Sharing Workflows
Making Content Public
Public Home Page
The public home page features:
- All Public Folders: Paginated list of publicly shared folders
- All Public Files: Paginated list of publicly shared files with download links
- Search & Filter: Find specific public content
- Statistics: Total public content counts
Search & Filter
Pagination System
ADMA implements comprehensive pagination for optimal performance:
- Items Per Page: Maximum 100 items (folders + files) per page
- Smart Ordering: Folders displayed first (alphabetical), then files (newest first)
- Page Navigation: First, Previous, page numbers, Next, Last controls
- Page Information: "Showing X-Y of Z items" counter
- Universal: Available on dashboard, all folder views, and public pages
View Modes
List View
- Tabular format with columns
- Shows name, type, size, date, status
- Compact display for many items
- Sortable columns
Panel View
- Card-based visual layout
- Large icons and previews
- More details per item
- Better for browsing
Filter Options
Future enhancements may include:
- Filter by file type (GIS, Document, Image, etc.)
- Filter by date range
- Filter by file size
- Filter by processing status (for GIS files)
- Search by filename or content
- Filter by coordinate system
Third-Party Integration
ADMA integrates with external agricultural data platforms to automatically sync field data, boundaries, and sensor observations.
John Deere Operations Center
John Deere Integration
ADMA connects to John Deere Operations Center API to automatically sync field data, boundaries, and field operations.
Data Synced from John Deere
Field Data
- Field Metadata: Field name, ID, and properties saved as JSON
- Field Boundaries: Geographic boundaries saved as shapefiles (.shp, .shx, .dbf, .prj, .cpg)
- Automatic GIS Processing: Boundaries are automatically published to GeoServer for visualization
Field Operations
- Operation Metadata: Operation type, dates, and details saved as JSON
- Operation Boundaries: Coverage areas saved as shapefiles
- Operation Types: Planting, harvesting, tillage, application operations
Folder Structure
John Deere data is organized in a structured folder hierarchy:
Sync Schedule
John Deere data sync runs automatically on a daily schedule via Celery Beat. The sync is incremental - only new fields and operations are added.
Realm5 Weather Stations
Realm5 Integration
ADMA connects to Realm5 API to sync weather station data and daily observations for agricultural monitoring.
Data Synced from Realm5
- Device Information: Weather station metadata and configuration
- Daily Observations: Weather data saved as JSON files (one per day)
- Historical Data: Syncs observations starting from January 1, 2024
- Sensor Readings: Temperature, humidity, precipitation, wind, and other environmental data
Folder Structure
Sync Schedule
Realm5 data syncs daily via Celery Beat. The sync fetches all historical data from January 1, 2024 onwards and continues to add new daily observations.
Analysis Tools
ADMA provides specialized agricultural analysis tools for processing GIS data and generating insights.
Seeding Tool
Seeding Analysis Tool
Processes as-applied seeding data to generate polygon maps and summary statistics.
Features
- Polygon Generation: Creates polygon shapefiles from seeding point data
- Boundary Extraction: Generates field boundary shapefiles
- Summary Statistics: Produces CSV summary reports with key metrics
- Background Processing: Runs asynchronously via Celery for large datasets
Output Files
| Output | Format | Description |
|---|---|---|
| Polygons | Shapefile (.shp + components) | Polygon representation of seeding data |
| Boundary | Shapefile (.shp + components) | Field boundary extracted from data |
| Summary | CSV | Statistical summary and metrics |
How to Use
Shape to JSON Converter
Shapefile to GeoJSON Conversion
Converts ESRI Shapefile format to GeoJSON for web-friendly data interchange.
Features
- Format Conversion: Transforms .shp files to .geojson
- Attribute Preservation: Maintains all feature attributes
- Coordinate Systems: Handles coordinate transformations
- Web Compatible: Output is directly usable in web mapping applications
SI Tool (Spectral Index Tool)
Spectral Index Analysis
Calculates spectral indices from multispectral imagery for crop health monitoring.
Features
- Index Calculation: Computes vegetation indices (NDVI, etc.)
- Raster Processing: Handles GeoTIFF input files
- Output Generation: Creates indexed raster outputs
Custom Maps
ADMA allows you to create custom maps by combining multiple GIS layers into a single interactive visualization.
Creating Custom Maps
Multi-Layer Map Creation
Combine multiple published GIS files into a single map view for comprehensive data visualization.
How to Create a Map
Layer Selection
- Folder Navigation: Browse through your folder hierarchy to find layers
- Published Files Only: Only GIS files with "Published" status can be added as layers
- Multiple Selection: Select multiple files by clicking the checkboxes
- Layer Count: The interface shows how many layers are currently selected
Supported Layer Types
| Layer Type | File Formats | Description |
|---|---|---|
| Vector Layers | .shp, .geojson, .gpkg, .kml | Points, lines, and polygon features |
| Raster Layers | .tif, .tiff (GeoTIFF) | Satellite imagery, DEMs, analysis outputs |
Map Features
- Layer Toggle: Show/hide individual layers on the map
- Layer Ordering: Layers are displayed in the order they were added
- Auto Extent: Map automatically zooms to fit all layer bounds
- Base Maps: Multiple base map options (OpenStreetMap, satellite, etc.)
Managing Maps
Your created maps are accessible from the Maps section:
- View Maps: Open any saved map in the interactive viewer
- Map List: Browse all your created maps
- Public Maps: Maps can be made public for sharing
API Endpoints
Token-Based REST API
ADMA provides comprehensive token-based REST APIs for programmatic access:
Authorization: Token your_token_here in request headers.
Authentication Endpoints
| Endpoint | Method | Purpose | Authentication |
|---|---|---|---|
| /api/v1/auth/token/ | POST | Create authentication token | Username/Password |
File Management APIs
| Endpoint | Method | Purpose | Parameters |
|---|---|---|---|
| /api/v1/files/upload/ | POST | Upload multiple files | files, folder_id, is_public |
| /api/v1/files/ | GET | List user's files | folder_id, is_public, file_type |
| /api/v1/files/{id}/download/ | GET | Download specific file | None |
Folder Management APIs
| Endpoint | Method | Purpose | Parameters |
|---|---|---|---|
| /api/v1/folders/upload/ | POST | Upload folder structure | files, file_paths, folder_id, is_public |
| /api/v1/folders/ | GET | List user's folders | parent_id, is_public |
| /api/v1/folders/{id}/info/ | GET | Get folder information | None |
| /api/v1/folders/{id}/download/ | GET | Download folder as ZIP | include_subfolders |
API Usage Examples
Web Interface AJAX Endpoints
Internal endpoints used by the web interface:
| Endpoint | Method | Purpose | Authentication |
|---|---|---|---|
| /api/folder/create/ | POST | Create new folder (web UI) | Session |
| /api/files/upload/ | POST | Upload files (web UI) | Session |
| /api/folders/upload/ | POST | Upload folders (web UI) | Session |
| /api/item/delete/ | POST | Delete files or folders | Session |
| /api/item/toggle-visibility/ | POST | Change public/private status | Session |
| /api/search/ | GET | Search files and folders | Session |
GeoServer Integration
GIS data is served through GeoServer REST API:
File Download URLs
API Documentation
Complete API Reference
ADMA provides comprehensive token-based REST APIs for programmatic access to all system features. The complete API documentation includes detailed examples, error handling, and integration guides.
API Documentation File
The complete API documentation is available as a detailed markdown file in the project repository:
Key API Features
Token Authentication
- Secure token-based authentication
- Create tokens via username/password
- Long-lived persistent tokens
- Management commands for token creation
File Operations
- Upload single or multiple files
- Upload complete folder structures
- Download individual files
- Download folders as ZIP archives
Folder Management
- List folders with filtering
- Get folder information and statistics
- Preserve folder hierarchy on upload
- Recursive subfolder inclusion
Advanced Features
- Comprehensive error handling
- Query parameter filtering
- JSON response format
- RESTful design principles
API Usage Workflow
POST /api/v1/auth/token/
POST /api/v1/files/upload/ with token authentication
GET /api/v1/files/
Python Integration Example
API_DOCUMENTATION.md file in the project repository.
API Management Commands
| Command | Purpose | Example |
|---|---|---|
| create_api_token | Create token for user | python manage.py create_api_token username |
| create_api_token --regenerate | Regenerate existing token | python manage.py create_api_token username --regenerate |
System Architecture
Technology Stack
Backend Technologies
- Django 4.2: Web framework and ORM
- PostgreSQL: Primary database with PostGIS extension
- Redis: Caching and Celery message broker
- Celery: Asynchronous task processing
- GeoServer: Spatial data server and WMS
- GDAL/OGR: Geospatial data processing libraries
Frontend Technologies
- Bootstrap 5: UI framework and responsive design
- OpenLayers: Interactive mapping library
- Font Awesome: Icons and visual elements
- JavaScript ES6+: Modern client-side scripting
- AJAX/Fetch: Asynchronous data operations
- CSS3: Advanced styling and animations
Service Architecture
Data Flow
Deployment
ADMA is containerized using Docker Compose for easy deployment:
Troubleshooting
Common Issues
File Upload Problems
Solution: Reduce number of files per upload or check server file limits
Solution: Refresh page, check browser console for JavaScript errors
GIS File Processing
Solution: Ensure all required components (.shp, .shx, .dbf) are uploaded
Solution: Verify file is in "Published" status and coordinate system is supported
Map Visualization Issues
Solution: Check internet connection and GeoServer availability
Solution: Refresh page, browser may need time to position elements
Performance Optimization
- Large Files: Upload large GIS files during off-peak hours
- Batch Uploads: Use folder upload for multiple related files
- Browser Cache: Clear browser cache if interface appears outdated
- Pagination: Use page navigation for folders with many items
Getting Help
- Check browser console (F12) for JavaScript errors
- Verify file formats are supported
- Ensure adequate internet connection for uploads
- Contact system administrator for persistent issues
Frequently Asked Questions
General Usage
Q: What's the maximum file size I can upload?
A: The system supports large file uploads, but practical limits depend on your internet connection and server configuration. For very large GIS files (>100MB), consider compressing or splitting the data.
Q: Can I upload folders with nested subfolders?
A: Yes, the folder upload feature supports unlimited nesting levels and preserves the complete directory structure.
Q: How do I share my data with others?
A: Set files or folders to "Public" in their detail pages. Public content appears on the home page and can be accessed via direct links without authentication.
GIS and Mapping
Q: Which coordinate systems are supported?
A: ADMA automatically handles most common coordinate systems including WGS84, Web Mercator, and UTM zones. The system detects and transforms coordinates as needed.
Q: Why is my shapefile not displaying on the map?
A: Ensure all required shapefile components are uploaded (.shp, .shx, .dbf minimum) and wait for processing to complete. Check that the file status shows "Published" before attempting map visualization.
Q: Can I view my data in other mapping applications?
A: Yes, published GIS data is served via standard WMS protocols and can be accessed by QGIS, ArcGIS, and other GIS software using the provided WMS URLs.
Technical Questions
Q: Is my data secure?
A: Private files are only accessible to their owners. The system uses Django's built-in authentication and authorization. Public files are intentionally accessible to anyone with the link.
Q: How long does GIS processing take?
A: Processing time depends on file size and complexity. Simple files process within seconds, while large or complex datasets may take several minutes. The system provides real-time status updates.
Q: Can I use the system on mobile devices?
A: Yes, ADMA features a responsive design that works on tablets and smartphones. Some features like folder uploads work best on desktop browsers.