import*as t from"../../dbf/index.js";import*as e from"./types.js";import*as s from"./prj.js";import*as a from"./points.js";import*as n from"./multipoint.js";import*as o from"./poly.js";var r={1:a,3:o,5:o,8:n,11:a,13:o,15:o,18:n};export default m;function m(a,n,o,m){var p=e.geometries[n],l=r[p],w=100+l.shpLength(o,p),x=100+l.shxLength(o),u=new ArrayBuffer(w),j=new DataView(u),F=new ArrayBuffer(x),h=new DataView(F),y=l.extent(o);i(j,p),i(h,p),f(y,j),f(y,h),l.write(o,y,new DataView(u,100),new DataView(F,100),p),j.setInt32(24,w/2),h.setInt32(24,50+4*o.length),m(null,{shp:j,shx:h,dbf:t.structure(a),prj:s})}function i(t,e){t.setInt32(0,9994),t.setInt32(28,1e3,!0),t.setInt32(32,e,!0)}function f(t,e){e.setFloat64(36,t.xmin,!0),e.setFloat64(44,t.ymin,!0),e.setFloat64(52,t.xmax,!0),e.setFloat64(60,t.ymax,!0),e.setFloat64(68,t.zmin,!0),e.setFloat64(76,t.zmax,!0),e.setFloat64(84,t.mmin,!0),e.setFloat64(92,t.mmax,!0)}