Bulk Upload Workflow

Primary page: /parcels/upload/

Supported Inputs

  • ZIP Shapefile (.zip containing .shp/.shx/.dbf)
  • GeoPackage (.gpkg)

Processing Pipeline

  1. Upload file
  2. Parse and normalize features via GDAL/OGR
  3. Coerce geometry to valid polygon
  4. Detect matches by parcel_id within target dataset
  5. Persist preview payload
  6. Review paginated preview
  7. Apply decision

Decisions at Apply Step

  • keep_existing
  • replace_matched
  • cancel

Effective At can be set when applying decisions.

Matching and Uniqueness

Matching is dataset-aware and uses:

  • current target dataset
  • incoming parcel_id

This aligns with active-row uniqueness:

  • one active row per dataset + parcel_id (valid_to IS NULL, record_status = active)

When replace_matched is selected:

  • matched active rows are superseded
  • replacement rows are inserted as new active versions

Form Mapping Inputs

Optional mapping fields:

  • parcel ID field override
  • name field override
  • type field override
  • address field override

Options:

  • skip invalid features
  • default parcel type fallback

Operational Dependencies

  • ogr2ogr required for conversion
  • ogrinfo required for GeoPackage layer inspection

Database Failure During Draft Creation

A database exception during draft creation rolls back that apply attempt. The preview returns HTTP 503 with a maintenance message, preserves its records, and disables the apply button on that response. Technical details go to the server log. After repairing the server, reload the preview and retry the same upload; re-uploading the GeoPackage is not necessary solely for this failure.

For a missing-column error, inspect migration state before investigating the uploaded geometry. For example, selection_action_id on parcels_parceldraftworkflowevent is added by migration 0028_workflow_selection_actions, which depends on 0027_viewport_cache_token. Apply pending migrations to the intended database only with owner authorization. The server must use code and database schema from the same migration state.