Files
TSYS-AIOS-GIS/Docker/TSYS-AIOS-GIS-Tools-GIS-Base

TSYS-AIOS-GIS-Tools-GIS-Base Container

This container is part of the TSYS-AIOS-GIS project and provides a base GIS and weather data processing environment.

Overview

The TSYS-AIOS-GIS-Tools-GIS-Base container is designed for GIS data processing and weather data analysis tasks. It includes essential tools for handling geospatial data formats and weather datasets with a focus on self-hosted GIS stack capabilities.

Tools Included

Core Tools

  • Base OS: Debian Bookworm slim
  • Shell: Bash
  • Programming Languages:
    • Python 3 with geospatial libraries
    • R with spatial packages

GIS Libraries

  • GDAL/OGR: Geospatial Data Abstraction Library for format translation and processing
  • PROJ: Coordinate transformation software
  • PostGIS: Client tools for spatial database operations
  • DuckDB: With spatial extensions for efficient data processing
  • GeoPandas: Python geospatial data handling
  • Shapely: Python geometric operations
  • Rasterio: Raster processing in Python

Weather Data Processing

  • xarray: Multi-dimensional data in Python
  • cfgrib: GRIB format handling
  • netCDF4: NetCDF file handling
  • MetPy: Meteorological calculations (via Python libraries)

Visualization

  • Folium: Interactive maps
  • Plotly: Time series visualization
  • Matplotlib/Seaborn: Statistical plots
  • R visualization packages: For statistical analysis

Additional Tools

  • Dask: For large data processing
  • FTP client: For bulk data downloads

Usage

Building the Base Container

# From this directory
cd /home/localuser/AIWorkspace/TSYS-AIOS-GIS/Docker/TSYS-AIOS-GIS-Tools-GIS-Base

# Use the wrapper script to automatically detect and set user IDs
./docker-compose-wrapper.sh build

# Or run commands in the base container with automatic user mapping
./docker-compose-wrapper.sh run tsys-gis-base [command]

# Example: Process a shapefile with GDAL
./docker-compose-wrapper.sh run tsys-gis-base ogrinfo /workspace/path/to/shapefile.shp

# Example: Start Python with geospatial libraries
./docker-compose-wrapper.sh run tsys-gis-base python3

# Example: Start R with spatial packages
./docker-compose-wrapper.sh run tsys-gis-base R

Using with docker-compose directly

# Set environment variables and run docker-compose directly
LOCAL_USER_ID=$(id -u) LOCAL_GROUP_ID=$(id -g) docker-compose up --build

# Or export variables first
export LOCAL_USER_ID=$(id -u)
export LOCAL_GROUP_ID=$(id -g) 
docker-compose up

Using the wrapper script

# Build and start the base GIS container with automatic user mapping
./docker-compose-wrapper.sh up --build

# Start without rebuilding
./docker-compose-wrapper.sh up

# View container status
./docker-compose-wrapper.sh ps

# Stop containers
./docker-compose-wrapper.sh down

User ID Mapping (For File Permissions)

The container automatically detects and uses the host user's UID and GID to ensure proper file permissions. This means:

  • Files created inside the container will have the correct ownership on the host
  • No more root-owned files after container operations
  • Works across different environments (development, production servers)

The container detects the user ID from the mounted workspace volume. If needed, you can override the default values by setting environment variables:

# Set specific user ID and group ID before running docker-compose
export LOCAL_USER_ID=1000
export LOCAL_GROUP_ID=1000
docker-compose up

Or run with inline environment variables:

LOCAL_USER_ID=1000 LOCAL_GROUP_ID=1000 docker-compose up

The container runs as a non-root user named TSYS-Tools with the detected host user's UID/GID.

Data Processing Workflows

This container is designed to handle both:

  • GIS data processing (shapefiles, GeoJSON, Parquet, etc.)
  • Weather data processing (GRIB, NetCDF formats)
  • ETL workflows for geospatial and meteorological datasets
  • Integration with PostGIS for spatial database operations
  • Output to MinIO buckets for business use

Integration

  • Can be used in CTO mode for R&D activities
  • Compatible with existing documentation containers for report generation
  • Designed for both workstation prototyping and server deployment