Skip to content

write_shapefile builtin

write_shapefile(path, data)

Writes a PointSet or Polylines as a 3D shapefile.

Parameters:

Name Type Description Default
path str or Path

The .shp file; .shx, .dbf, .cpg and, with a CRS, .prj are written beside it.

required
data PointSet or Polylines

Points are written as PointZ. Polylines with all parts open are written as PolyLineZ, with all parts closed as PolygonZ, rings wound outer clockwise and holes counter-clockwise; split mixed ones by closed. Attribute names must be ASCII of at most 10 characters; numeric, bool and text columns are written, nulls as blanks. The CRS is written verbatim to the .prj, which GIS software expects as WKT.

required

used in