AFA Documentation
Breadcrumbs

Shapefile Specification (2.9.0)

AFA accepts standard ESRI Shapefiles containing points, lines, and polygon geometries, along with optional attribute fields.


1. Overview

The application supports uploading spatial data from ESRI Shapefiles (.shp). Shapefiles are widely used for GIS data and consist of multiple files packaged together.

Supported geometry types include:

  • Point

  • Polyline / Line

  • Polygon / MultiPolygon

Shapefiles may also contain attribute tables (DBF) that can map to well names or other metadata.

💡 Tip: You can create or export Shapefiles from tools such as QGIS, ArcGIS, MapInfo, or Petrel.


2. Required Files

To ensure successful upload, a Shapefile must include at least these three files:

Extension

Description

.shp

Geometry data (required)

.shx

Shape index file (required)

.dbf

Attribute table (required)

Optional but recommended:

Extension

Description

.prj

CRS (Coordinate Reference System) definition

.cpg

Character encoding used in DBF

⚠️ Uploading only the .shp file will fail.

Uploading .prj is strongly recommended to avoid CRS misinterpretation.


3. Uploading Shapefiles

Shapefiles must be compressed into a single .zip file before upload.

Example structure:

wells.zip
  ├── wells.shp
  ├── wells.shx
  ├── wells.dbf
  ├── wells.prj
  └── wells.cpg

💡 Tip: Do not rename individual shapefile components after zipping.

All component filenames must match (e.g. wells.*).


4. Supported Geometry Types

The Map View supports the following ESRI shapefile geometry types:

Shape Type

Description

Point

Single coordinate (well location)

Polyline

One or more connected line segments

Polygon

Area boundaries (tenements, leases)

MultiPatch

Not supported

3D Shape Types

Ignored (Z values are dropped)


5. Attribute Mapping

Attribute fields stored in the .dbf file can optionally be used to name wells or shapes.

Required Field (if available)

Field

Description

well_name

Used to label wells or features

If well_name does not exist, the system:

  1. Attempts to use another name-like field (name, well, id, label)

  2. Falls back to an autogenerated name if none are available


6. Coordinate Reference System (CRS) Support

Whenever included, the shapefile must provide a .prj file displaying the CRS.

Supported CRS values include:

CRS

Description

EPSG:4326

WGS84

EPSG:4283

GDA94

EPSG:7856

GDA2020

Example .prj content:

GEOGCS["GDA2020",DATUM["Geocentric_Datum_of_Australia_2020",SPHEROID["GRS 1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]]

⚠️ If no .prj is included, we assume EPSG:4326 (WGS84).

This may place Australian datasets in the wrong location. Always include the .prj.


7. Examples of Accepted Shapefiles

Point Layer Example

Used for well locations or sample points.

Attributes (.dbf):

well_name

field

formation

ABC123

SomeFieldName

ReservoirX

Geometry (.shp):

  • Shape type: Point

  • Coordinates: [longitude, latitude] in decimal degrees


Polyline Layer Example

Used for pipelines, line paths, or spatial boundaries.

Geometry:

  • Shape type: Polyline

  • Multiple connected segments allowed


Polygon Layer Example

Used for leases, boundaries, exclusion areas.

Geometry:

  • Shape type: Polygon

  • Must be closed (start and end point equal)

  • MultiPolygons supported


8. Behaviour When Extra Data Exists

To avoid unpredictable behaviour, the AFA will ignores:

  • Extra DBF fields

    • They are skipped and never validated.

  • Additional geometry fields

    • Z (height) or M (measure) values are ignored.

  • Extra files in the ZIP

    • Examples: .sbn, .sbx, .qix, .xml, .fix — harmless and ignored.

  • Unrecognised geometry

    • Unsupported shapes (e.g., MultiPatch or geometry collections) are ignored at feature level.

  • Duplicate or nested layers

    • Only the first valid shapefile inside the ZIP is processed. Everything else is ignored.

  • Custom metadata

    • Everything beyond the required minimal structure is ignored.

This ensures the upload system remains fast, secure, and predictable.


9. Common Errors & Fixes

Error

Cause

Solution

“Missing .shx or .dbf file”

ZIP contains only .shp

Include full shapefile package

“Unsupported geometry type: MultiPatch”

3D or surface data

Export as standard Polygon/Polyline

“Missing .prj file”

CRS unknown

Add .prj or re-export

“Encoding error reading DBF file”

DBF not UTF-8

Include .cpg specifying encoding

Shapes appear in wrong location

CRS mismatch

Ensure .prj is EPSG:4326 or GDA


10. Best Practices

  • Always upload all shapefile components in a single ZIP file.

  • Avoid complex multi-part polygons with thousands of vertices.

  • Use UTF-8 encoding (add .cpg containing UTF-8).

  • Use meaningful well_name fields where possible.

  • Keep attribute field names under 10 characters (DBF limitation).

  • Ensure polygons are properly closed.