South African data · 4 min read
The SG 21-digit code: reading a South African land parcel key
By the RICE team · Published 5 November 2026
If you work with cadastral data in South Africa, you will meet a field holding something like C11000000000000400000. It is the Surveyor-General’s parcel key, also called the SG code or LPI code. It is the most reliable way to join a boundary to anything else, as long as it survives your spreadsheet.
The five parts
The key is always 21 characters long:
| Position | Length | Part | Example |
|---|---|---|---|
| 1 | 1 | Surveyor-General office | C |
| 2–4 | 3 | Major region | 110 |
| 5–8 | 4 | Minor region | 0000 |
| 9–16 | 8 | Parcel number | 00000004 |
| 17–21 | 5 | Portion number | 00000 |
Here is that example as a whole, split into its parts:
C 110 0000 00000004 00000 | | | | └ portion 0 | | | └ parcel 4 | | └ minor region 0000: not in a township | └ major region 110 └ Cape office
That is a real key. Published environmental application documents list C11000000000000400000 as the Remainder of Farm Fairfield 4 (SAHRIS). You can check any key, including that one, with the decoder in the South African reference finder.
What each part means
The office letter is C, T, F or N, for Cape, Transvaal, Free State and Natal. These are the old four provinces, not the current nine. A parcel in Mpumalanga or Limpopo can begin with T, and one in the Eastern Cape with C. Do not use this letter to filter by modern province; use the parcel’s location, or a spatial join against current boundaries.
The major region is the registration division or similar district. Some references describe position 2 as always zero, with only positions 3 and 4 being the code. Real keys do not all follow that: the example above has a 1 in position 2. So treat positions 2 to 4 as a single three-character code, and remember that it is not always numeric.
The minor region tells you whether the parcel is in a township. 0000 means farmland or a registered district with no township. 0001 and above identifies a township, numbered within the office.
The parcel number is the farm number or the erf number. It restarts within each township, so erf 45 exists in thousands of places. That is why a number on its own never identifies a property.
The portion number identifies a subdivision of the parcel. In the example, 00000 goes with the title “Remainder of Farm Fairfield 4”, so do not assume that portion zero always means the whole original farm. It may be what is left after other portions have been subdivided out.
To turn region codes into names, you need the lookup tables. The Office of the Chief Surveyor-General publishes region tables, and it is the authority for what any code means.
Three mistakes that break a key
Treating its parts as numbers. Because a full key starts with a letter, spreadsheets normally keep it as text. The risk is in split columns: a parcel number or minor region code stored as a number loses its leading zeros. Import those fields explicitly as text.
Rebuilding keys without padding. Joining C110, 0, 4 and 0 gives C110040, which is not a key. Each part has to be zero-padded to its full width.
Joining on the erf number. It looks like an identifier, and the join will appear to work, but it quietly matches parcels from different townships. Always join on the full key, and count the matches afterwards.
A quick validity check
Before you trust a column, test it. This pattern matches the structure described above:
^[CTFN][A-Z0-9]{3}[0-9]{4}[0-9]{8}[0-9]{5}$In a table of any size, also check for:
- values that are not exactly 21 characters long, usually the result of lost zeros or stray spaces
- duplicates, which can be legitimate where one parcel appears in several records, but which multiply rows in a join
- keys that are valid in form but have no match in your boundary layer, which often means that a parcel was subdivided or consolidated after your layer was made
Passing the pattern only shows that a key is well formed. It does not show that the parcel exists.
Keys and boundaries are not the legal record
A cadastral GIS layer is a convenient copy. The legal description of a boundary is the approved SG diagram or general plan, and ownership is recorded by the Deeds Office. Use the key to find the right record. Do not treat the shape on your map as a surveyed boundary. Where to find South African GIS data lists where to get each.
If you are overlaying parcels from different sources and they do not line up, check the coordinate system before you suspect the key. Older cadastral data may be on the Cape datum.
Paste a key to split it into office, regions, parcel and portion, and to check that it is well formed.
Open the toolWritten and maintained by the RICE team at LocalID IQ Pty Ltd. Questions or corrections: info@rice.org.za. About RICE.
