Interface: LayerInput
Defined in: layers.ts:37
One layer to write into a multi-layer archive.
Extends
Properties
dimensions?
optional dimensions?: Dimensions;Defined in: types.ts:147
Force the dimensionality.
By default a third ordinate is read as Z and a fourth as a measure; pass 'xym' to treat the third as a measure instead.
Inherited from
epsg?
optional epsg?: number;Defined in: types.ts:213
EPSG code for the .prj.
Resolved against the built-in codes, anything registered via registerProjections, and — loaded on demand — the bundled table of 116 definitions. An unresolvable code throws rather than silently omitting the .prj.
Inherited from
geojson
geojson: string | GeoJsonInput;Defined in: layers.ts:47
The layer's geometry and attributes. Accepts everything writeShapefile does, including a JSON string.
maxFieldLength?
optional maxFieldLength?: number;Defined in: types.ts:154
Cap on .dbf character column width, 1–254. Defaults to 254.
Columns are otherwise sized to the longest value present. Lowering this shrinks the file at the cost of truncating long text.
Inherited from
name
name: string;Defined in: layers.ts:42
Base name for this layer's files. Sanitised the same way as fileName elsewhere, and must stay unique across the batch once sanitised.
prj?
optional prj?: string;Defined in: layers.ts:53
Alias for ProjectionOptions.wkt, so a layer returned by readShapefileZip can be passed straight back in without renaming a field. wkt wins if both are set.
shapeType?
optional shapeType?: ShapeFamily;Defined in: types.ts:140
Force a geometry family instead of inferring it from the data.
Useful when a batch happens to contain only Point features but downstream consumers expect Multipoint.
Inherited from
wkt?
optional wkt?: string;Defined in: types.ts:215
Raw ESRI WKT for the .prj. Takes precedence over epsg.