Expand description
Layer schema — the table-of-contents for one layer’s attributes + geometry + CRS.
§Structure
fields: Vec<FieldDef>— attribute columns in declared order. Order is the public contract: DBF row layout, Arrow column indices, FileGDB row-blob nullable bitmap all derive from it. Lookup-by-name is available viafield_index(name)against a precomputedHashMap.geometry: Option<GeomField>— optional because attribute-only tables exist (GDB system tables, DBF sidecars).crs: Crs— the source CRS, carried through verbatim. Readers populate it from.prj/ GDB geom-field metadata / GeoParquetgeometadata / etc. Writers serialize it in each format’s native form (WKT / PROJJSON / EPSG code / nothing).
§Clever bits
validate_rowtypechecks an attribute vector against the schema before writers ingest it — arity, type tags, nullability.name_indexisprivateso callers can’t desync it withfields; it’s rebuilt on everySchema::new. Adding fields requires a freshSchema, not a mutation.