func ReadHeaders(r ReadSeekCloser) (err error) {
	err = readFirstHeader(r)
	if err != nil {
		return xerrors.Errorf(`error reading first header (BE) part: %w`, err)
	}

	err = readSecondHeader(r)
	if err != nil {
		return xerrors.Errorf(`error reading second header (LE) part: %w`, err)
	}

	offset, err := r.Seek(0, io.SeekCurrent)
	if err != nil {
		return err
	}

	if offset != 100 {
		return fmt.Errorf(`offset is not 100`)
	}

	return nil
}
//Read headers shared by .shp and .shx file
Read headers shared by .shp and .shx file
// Read headers shared by . shp and . shx file
func ReadHeaders(r ReadSeekCloser) (err error) {
	err = readFirstHeader(r)
	if err != nil {
		return xerrors.Errorf(`error reading first header (BE) part: %w`, err)
	}
	err = readSecondHeader(r)
	if err != nil {
		return xerrors.Errorf(`error reading second header (LE) part: %w`, err)
	}
	offset, err := r.Seek(0, io.SeekCurrent)
	if err != nil {
		return err
	}
	if offset != 100 {
		return fmt.Errorf(`offset is not 100`)
	}
	return nil
}
func ReadHeaders ( r ReadSeekCloser ) ( err error ) { err = readFirstHeader ( r ) if err != nil { return xerrors . Errorf ( `error reading first header (BE) part: %w` , err ) } err = readSecondHeader ( r ) if err != nil { return xerrors . Errorf ( `error reading second header (LE) part: %w` , err ) } offset , err := r . Seek ( 0 , io . SeekCurrent ) if err != nil { return err } if offset != 100 { return fmt . Errorf ( `offset is not 100` ) } return nil }
Read headers shared by .shp and .shx file
Read headers shared by . shp and . shx file