gdb-breaker

n8n custom node for GDB Breaker - Convert ESRI FileGDB to GeoJSON

Package Information

Released: this month
Downloads: 0 weekly / 0 monthly
Latest Version: 1.0.7
Author: GDB Breaker Contributors

Documentation

n8n-nodes-gdb-breaker

n8n custom node for GDB Breaker - Convert ESRI FileGDB to GeoJSON records for Directus.

Features

  • Inspect GDB: Extract layer names, field definitions, sample values, geometry types
  • Convert GDB: Convert a specific layer to GeoJSON records with field mapping
  • Binary File Support: Accept GDB/ZIP files from previous nodes (HTTP Request, Read Binary File)
  • Field Mapping UI: Visual field mapping configuration in n8n
  • Directus Integration: Output records ready for Directus base_maps collection

Installation

# In your n8n custom nodes directory
npm install n8n-nodes-gdb-breaker

# Or install globally for n8n
npm install -g n8n-nodes-gdb-breaker

Then restart n8n.

Configuration

Credentials

Create GDB Breaker API credentials:

Field Description
Base URL GDB Breaker service URL (e.g., http://gdb-breaker:8000)
API Key Optional API key for authentication
Timeout Request timeout in ms (default: 300000 = 5 minutes)

Operations

1. Inspect GDB

Extract layer and field information from a GDB file.

Inputs:

  • Binary file (from HTTP Request, Read Binary File, etc.)
  • OR file path on GDB Breaker server

Output:

{
  "layers": [
    {
      "layer": "PARCELS",
      "fields": [
        {
          "name": "ESTATE",
          "type": "str:50",
          "sample_values": ["Estate A", "Estate B"],
          "nullable": false
        },
        ...
      ],
      "crs": "COMPD_CS[...]",
      "feature_count": 46227,
      "geometry_type": "3D MultiPolygon",
      "bounds": [387249, 17334, 475263, 65277]
    }
  ]
}

2. Convert GDB

Convert a specific layer to GeoJSON records with field mapping.

Inputs:

  • Binary file or file path
  • Layer name (from inspect results)
  • Base map name & type
  • Field mapping configuration

Field Mapping:

Field Required Description
Area ID Field No GDB field for unique area ID (auto-generated if empty)
Name Field Yes GDB field for area name
Code Field No GDB field for area code
Parent Field No GDB field for parent reference (hierarchy)
Properties Fields No Comma-separated additional fields

Output: One item per record, ready for Directus base_maps collection:

{
  "area_id": "wilayah_kerja_Test_District_0",
  "name": "DIV 01",
  "code": "EST",
  "type": "wilayah_kerja",
  "geometry_type": "MultiPolygon",
  "geometry": { "type": "MultiPolygon", "coordinates": [...] },
  "lat": 0.57505,
  "lng": 116.630444,
  "parent_area_id": "Estate A",
  "base_map_name": "Test District",
  "description": "Test conversion",
  "properties": { "SHAPE_Area": 7336990.06, "SHAPE_Length": 36257.35 },
  "status": "draft"
}

Example Workflow

Complete GDB Upload → Inspect → Convert → Directus

1. HTTP Request (GET file from source)
   ↓
2. GDB Breaker: Inspect
   ↓ (Set layer name, field mapping from inspect results)
3. GDB Breaker: Convert
   ↓ (Loop over items)
4. Directus: Create Item (base_maps collection)
   ↓
5. Directus: Update Job Status

File Input Options

Binary Data (Recommended)

Pass binary data from previous nodes:

  • HTTP Request → Response Format: "File" → Binary Property: data
  • Read Binary File → Binary Property: data
  • Then in GDB Breaker node: File Input = "Binary Data", Binary Property Name = data

File Path (Server-side)

If file already on GDB Breaker server:

  • File Input = "File Path"
  • File Path = /data/uploads/file.gdb.zip

Requirements

  • n8n >= 1.0.0
  • GDB Breaker service running (Docker: your-registry/gdb-breaker:3.0.0)
  • Directus instance for storing results

GDB Breaker Service

Run GDB Breaker as a Docker container:

# docker-compose.yml
services:
  gdb-breaker:
    image: your-registry/gdb-breaker:3.0.0
    ports:
      - "8000:8000"
    volumes:
      - directus_uploads:/data:ro
    environment:
      - API_KEY=your-secure-api-key
      - DATA_DIR=/data

volumes:
  directus_uploads:

Security

See SECURITY.md for complete security model.

Key points:

  • GDB Breaker runs in internal network only
  • API key authentication
  • Shared volume for file access
  • No direct internet exposure

License

MIT

Discussion